commented code
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
cd88205b40
commit
16e8067f8e
@ -13,6 +13,8 @@ public protocol EnumSubset<T>: RawRepresentable, CaseIterable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension EnumSubset where RawValue == T.RawValue {
|
extension EnumSubset where RawValue == T.RawValue {
|
||||||
|
|
||||||
|
/// Will either return the Generic RawRepresentable object or the defaultValue
|
||||||
public var value: T {
|
public var value: T {
|
||||||
T(rawValue: rawValue) ?? defaultValue
|
T(rawValue: rawValue) ?? defaultValue
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,12 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// Protocol used for objects that require to show an error
|
||||||
public protocol Errorable {
|
public protocol Errorable {
|
||||||
|
|
||||||
|
/// Whether not to show the errorText
|
||||||
var showError: Bool { get set }
|
var showError: Bool { get set }
|
||||||
|
|
||||||
|
/// Text that needs to be shown if showError is true
|
||||||
var errorText: String? { get set }
|
var errorText: String? { get set }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,12 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// Protocol used for a FormField object
|
||||||
public protocol FormFieldable {
|
public protocol FormFieldable {
|
||||||
|
|
||||||
|
/// Unique Id for the Form Field object within a Form
|
||||||
var inputId: String? { get set }
|
var inputId: String? { get set }
|
||||||
|
|
||||||
|
/// Value for the Form Field
|
||||||
var value: AnyHashable? { get set }
|
var value: AnyHashable? { get set }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user