changes
This commit is contained in:
parent
789442f13d
commit
5c0e433193
@ -320,8 +320,6 @@ import UIKit
|
|||||||
model.updateUIDynamicError = { [weak self] in
|
model.updateUIDynamicError = { [weak self] in
|
||||||
MVMCoreDispatchUtility.performBlock(onMainThread: {
|
MVMCoreDispatchUtility.performBlock(onMainThread: {
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|
||||||
model.isValid = false
|
|
||||||
self.updateValidation(model.isValid ?? false)
|
self.updateValidation(model.isValid ?? false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,10 @@ import Foundation
|
|||||||
public var title: String?
|
public var title: String?
|
||||||
public var feedback: String?
|
public var feedback: String?
|
||||||
public var dynamicErrorMessage: String? {
|
public var dynamicErrorMessage: String? {
|
||||||
didSet { updateUIDynamicError?() }
|
didSet {
|
||||||
|
isValid = dynamicErrorMessage?.isEmpty ?? true
|
||||||
|
updateUIDynamicError?()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public var errorMessage: String?
|
public var errorMessage: String?
|
||||||
public var errorTextColor: Color?
|
public var errorTextColor: Color?
|
||||||
@ -75,7 +78,9 @@ import Foundation
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public func formFieldValue() -> AnyHashable? {
|
public func formFieldValue() -> AnyHashable? {
|
||||||
dynamicErrorMessage = nil
|
if dynamicErrorMessage != nil {
|
||||||
|
dynamicErrorMessage = nil
|
||||||
|
}
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user