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 {
|
||||
|
||||
/// Will either return the Generic RawRepresentable object or the defaultValue
|
||||
public var value: T {
|
||||
T(rawValue: rawValue) ?? defaultValue
|
||||
}
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Protocol used for objects that require to show an error
|
||||
public protocol Errorable {
|
||||
|
||||
/// Whether not to show the errorText
|
||||
var showError: Bool { get set }
|
||||
|
||||
/// Text that needs to be shown if showError is true
|
||||
var errorText: String? { get set }
|
||||
}
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Protocol used for a FormField object
|
||||
public protocol FormFieldable {
|
||||
|
||||
/// Unique Id for the Form Field object within a Form
|
||||
var inputId: String? { get set }
|
||||
|
||||
/// Value for the Form Field
|
||||
var value: AnyHashable? { get set }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user