diff --git a/MVMCoreUI/FormUIHelpers/FormValidator.swift b/MVMCoreUI/FormUIHelpers/FormValidator.swift index 0ece4b4b..e2e725c1 100644 --- a/MVMCoreUI/FormUIHelpers/FormValidator.swift +++ b/MVMCoreUI/FormUIHelpers/FormValidator.swift @@ -46,6 +46,13 @@ import MVMCore groupWatchers.append(action) } + /// Removes the form field to the validator. + public func remove(_ field: FormFieldProtocol) { + if let fieldKey = field.fieldKey { + fields.removeValue(forKey: fieldKey) + } + } + /// Determines the type of item and adds it. private func insert(_ item: FormItemProtocol) { if let item = item as? FormFieldProtocol {