Created
August 5, 2018 23:01
-
-
Save Arrlindii/de0f9e4ed4b6de71a038852ca0941171 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func validate() { | |
| let emailValidator = VaildatorFactory.validatorFor(type: .email) | |
| do { | |
| try emailValidator.validate(emailTextField.text) | |
| }catch(let error) { | |
| showAlert(for: (error as! ValidationError).message) | |
| } | |
| let validatedEmail = emailTextField.text! | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment