Created
August 21, 2018 17:47
-
-
Save Arrlindii/18a6e056d61f0d28867b3c0c3e94ee8f 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
| extension UITextField { | |
| func validatedText(validationType: ValidatorType) throws -> String { | |
| switch validationType { | |
| case .email: //Validation Logic to determine if text is an email | |
| case .name: //Validation Logic to determine if text is allowed to represent a name | |
| case .requiredField: //Validation Logic to determine if text is provided | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment