Skip to content

Commit 49ca08d

Browse files
authored
Update README.md
1 parent 1081a3e commit 49ca08d

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
@@ -42,11 +42,11 @@ if (empty($data['username'])) {
4242
You can now test the `ValidationResult` and throw an exception if it contains errors.
4343

4444
```php
45+
<?php
46+
4547
if ($validationResult->isFailed()) {
46-
// Global error message
4748
$validationResult->setMessage('Please check your input');
48-
49-
// Trigger error response (see validation middleware)
49+
5050
throw new ValidationException($validationResult);
5151
}
5252
```

0 commit comments

Comments
 (0)