Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Getting Error due to operator overloading in Swift 5.1 #133

Open
defib22 opened this issue Nov 22, 2019 · 1 comment
Open

Getting Error due to operator overloading in Swift 5.1 #133

defib22 opened this issue Nov 22, 2019 · 1 comment

Comments

@defib22
Copy link

defib22 commented Nov 22, 2019

Cannot invoke initializer for type 'ValidationRulePattern' with an argument list of type '(pattern: EmailValidationPattern, error: ValidationError)'
Screenshot 2019-11-22 at 4 44 39 PM

@anphanngocvn
Copy link

anphanngocvn commented Jan 6, 2020

@defib22 Change your custom validator struct to something like this will resolved the above issue:

`struct ExampleValidationError: ValidationError {

let message: String

public init(_ message: String) {
    
    self.message = message
}

}`

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

No branches or pull requests

2 participants