diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift index 9e8b531e..16d36bc7 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryField.swift @@ -320,8 +320,6 @@ import UIKit model.updateUIDynamicError = { [weak self] in MVMCoreDispatchUtility.performBlock(onMainThread: { guard let self = self else { return } - - model.isValid = false self.updateValidation(model.isValid ?? false) }) } diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryFieldModel.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryFieldModel.swift index 63d1164e..c9d60bfe 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryFieldModel.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/EntryFieldModel.swift @@ -23,7 +23,10 @@ import Foundation public var title: String? public var feedback: String? public var dynamicErrorMessage: String? { - didSet { updateUIDynamicError?() } + didSet { + isValid = dynamicErrorMessage?.isEmpty ?? true + updateUIDynamicError?() + } } public var errorMessage: String? public var errorTextColor: Color? @@ -75,7 +78,9 @@ import Foundation //-------------------------------------------------- public func formFieldValue() -> AnyHashable? { - dynamicErrorMessage = nil + if dynamicErrorMessage != nil { + dynamicErrorMessage = nil + } return text }