From 16e8067f8edb86af7eb958d2d98f04b35518324b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 26 Jul 2023 10:23:38 -0500 Subject: [PATCH] commented code Signed-off-by: Matt Bruce --- VDS/Protocols/EnumSubset.swift | 2 ++ VDS/Protocols/Errorable.swift | 5 +++++ VDS/Protocols/FormFieldable.swift | 5 +++++ 3 files changed, 12 insertions(+) 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 } }