Please give a straightforward example to validate an email string: let email: String?
Let's check for a value first (required) then for pattern (valid email address)
From the many examples it's not clear how to do it.
I was only able to do it by unwrapping the value first, but that just defeats the purpose of the library.
Also, you give some examples with ValidationError but that class is nowhere to be found.
Please consider including it as a helper class and rewriting the examples with them instead of someValidationErrorType.
Please give a straightforward example to validate an email string:
let email: String?
Let's check for a value first (required) then for pattern (valid email address)
From the many examples it's not clear how to do it. I was only able to do it by unwrapping the value first, but that just defeats the purpose of the library.
Also, you give some examples with
ValidationError
but that class is nowhere to be found. Please consider including it as a helper class and rewriting the examples with them instead ofsomeValidationErrorType
.