diff --git a/VDS/Protocols/EnumSubset.swift b/VDS/Protocols/EnumSubset.swift index 5f92a1cd..a690fca3 100644 --- a/VDS/Protocols/EnumSubset.swift +++ b/VDS/Protocols/EnumSubset.swift @@ -13,6 +13,8 @@ public protocol EnumSubset: 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 } diff --git a/VDS/Protocols/Errorable.swift b/VDS/Protocols/Errorable.swift index bd9b41de..5323dd17 100644 --- a/VDS/Protocols/Errorable.swift +++ b/VDS/Protocols/Errorable.swift @@ -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 } } diff --git a/VDS/Protocols/FormFieldable.swift b/VDS/Protocols/FormFieldable.swift index 41017204..935b3d53 100644 --- a/VDS/Protocols/FormFieldable.swift +++ b/VDS/Protocols/FormFieldable.swift @@ -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 } }