Last active
January 18, 2018 20:39
-
-
Save bill350/84c6bc3ee4fd20d6059449005f34a533 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
| // MARK: Form Validation | |
| @discardableResult | |
| func isValid() -> (Bool, String?) { | |
| var isValid = true | |
| for item in self.formItems { | |
| item.checkValidity() | |
| if !item.isValid { | |
| isValid = false | |
| } | |
| } | |
| return (isValid, nil) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment