File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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```
You can’t perform that action at this time.
0 commit comments