Skip to content

Commit f07d52a

Browse files
committed
Update readme
1 parent 3e891d1 commit f07d52a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can now test the `ValidationResult` and throw an exception if it contains er
5656

5757
```php
5858
<?php
59-
if ($validationResult->isFailed()) {
59+
if ($validationResult->fails()) {
6060
throw new ValidationException('Please check your input', $validationResult);
6161
}
6262
```
@@ -109,7 +109,7 @@ $validation = new ValidationResult();
109109

110110
// ...
111111

112-
if ($validation->isFailed()) {
112+
if ($validation->fails()) {
113113
throw new ValidationException('Please check your input', $validation);
114114
}
115115
```
@@ -267,7 +267,7 @@ if ($this->existsUsername($formData['username'])) {
267267
$validationResult->addError('username', 'Username is already taken);
268268
}
269269

270-
if ($validationResult->isFailed()) {
270+
if ($validationResult->fails()) {
271271
throw new ValidationException('Validation failed. Please check your input.', $validationResult);
272272
}
273273
```

0 commit comments

Comments
 (0)