Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'UIViewController' does not conform to protocol 'ValidationDelegate' #169

Open
bharath555vasu opened this issue Nov 24, 2016 · 5 comments
Open

Comments

@bharath555vasu
Copy link

Unable to delegate Protocol "ValidationDelegate" required UIViewControlled. I am getting this error, it would be great help if any one known how to over come this error.

Thanks

@develth
Copy link

develth commented May 9, 2017

Do you solved this already?

@rushabh1191
Copy link

rushabh1191 commented Jun 13, 2017

Did anybody solve this problem? I am getting this in Swift 3
This is pod :
pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :branch => 'master'

@xthaohg
Copy link

xthaohg commented Nov 20, 2017

in swift 4. i have this.

@IslamAbdelAziz
Copy link

any body solved This ??

@rehmantalha
Copy link

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
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants