Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit de69a8d

Browse files
committed
chore: improved error handling section
1 parent b49ee76 commit de69a8d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/02-usage.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ catch (ValidationException $exception) {
228228
}
229229
```
230230

231-
An `UnexpectedValueException` is thrown when the provided input data is not valid to perform the validation.
231+
When using both the [`assert`](#assert) or [`validate`](#validate) methods, an `UnexpectedValueException` is thrown when the provided input data is not valid to perform the validation.
232+
232233
For example, when trying to compare a date with a string:
233234

234235
```php
@@ -243,8 +244,6 @@ catch (UnexpectedValueException $exception) {
243244
}
244245
```
245246

246-
This exception is thrown when using [`assert`](#assert) or [`validate`](#validate).
247-
248247
## Custom Error Messages
249248

250249
All rules have at least one error message that can be customized (some rules have more than one error message for different case scenarios).

0 commit comments

Comments
 (0)