Skip to content

Commit fbaf18a

Browse files
authored
update code example, fix end parenthesis
update code example, fix end parenthesis and validate(self) call, delegate is not need here.
1 parent 8f224ab commit fbaf18a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Validate Fields on button tap or however you would like to trigger it.
8989

9090
```swift
9191
@IBAction func signupTapped(sender: AnyObject) {
92-
validator.validate(delegate:self)
92+
validator.validate(self)
9393
}
9494
```
9595

@@ -102,7 +102,7 @@ func validationSuccessful() {
102102
// submit the form
103103
}
104104

105-
func validationFailed(errors:[(Validatable ,ValidationError]) {
105+
func validationFailed(errors:[(Validatable ,ValidationError)]) {
106106
// turn the fields to red
107107
for (field, error) in validator.errors {
108108
if let field = field as? UITextField {

0 commit comments

Comments
 (0)