update code example, fix end parenthesis

update code example, fix end parenthesis and validate(self) call, delegate is not need here.
This commit is contained in:
sonique6784 2016-06-25 01:38:57 +10:00 committed by GitHub
parent 8f224aba83
commit fbaf18ac67
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ Validate Fields on button tap or however you would like to trigger it.
```swift
@IBAction func signupTapped(sender: AnyObject) {
validator.validate(delegate:self)
validator.validate(self)
}
```
@ -102,7 +102,7 @@ func validationSuccessful() {
// submit the form
}
func validationFailed(errors:[(Validatable ,ValidationError]) {
func validationFailed(errors:[(Validatable ,ValidationError)]) {
// turn the fields to red
for (field, error) in validator.errors {
if let field = field as? UITextField {