You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added ValidationDelegate to my viewController and also implementing both required methods. But still, I am getting "Does not conform to protocol" error.
I am using Xcode 9.3 and Swift 4.1
The text was updated successfully, but these errors were encountered:
I am using Xcode 12.5, swift 5 faced the same error, but instead of using the
validator.validate(self) and implementing the protocol i used the callback function
validator.validate { [weak self] errors in
guard let self = self else { return }
if errors.count > 0 {
for (field, error) in errors {
if let field = field as? UITextField {
field.layer.borderColor = UIColor.red.cgColor
field.layer.borderWidth = 1.0
}
error.errorLabel?.text = error.errorMessage // works if you added labels
error.errorLabel?.isHidden = false
}
} else {
// success in validation
}
}
Hi,
I have added ValidationDelegate to my viewController and also implementing both required methods. But still, I am getting "Does not conform to protocol" error.
I am using Xcode 9.3 and Swift 4.1
The text was updated successfully, but these errors were encountered: