Skip to content

Commit

Permalink
doc: enhance validation chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Apr 6, 2023
1 parent f2921e8 commit 04e4479
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ nav:
- Getting Started: getting-started.md
- Usage:
- Object construction: usage/object-construction.md
- Error handling: usage/error-handling.md
- Validation & error handling: usage/validation-and-error-handling.md
- Type strictness & flexibility: usage/type-strictness-and-flexibility.md
- Type reference: usage/type-reference.md
- How-to:
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/project/changelog/version-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ You can click on the entries below to get advice on available replacements.
[type strictness & flexibility chapter]: ../../usage/type-strictness-and-flexibility.md
[performance & caching chapter]: ../../other/performance-and-caching.md
[custom object constructors chapter]: ../../how-to/use-custom-object-constructors.md
[error handling chapter]: ../../usage/error-handling.md
[custom exception chapter]: ../../usage/error-handling.md#custom-exception-messages
[error handling chapter]: ../../usage/validation-and-error-handling.md
[custom exception chapter]: ../../usage/validation-and-error-handling.md#custom-exception-messages
[error messages customization chapter]: ../../how-to/customize-error-messages.md

## ⚠ BREAKING CHANGES
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Error handling
# Validation and error handling

The source given to a mapper can never be trusted, this is actually the very
goal of this library: transforming an unstructured input to a well-defined
object structure. If the mapper cannot guess how to cast a certain value, it
means that it is not able to guarantee the validity of the desired object thus
it will fail.
object structure. If a value has an invalid type, or if the mapper cannot cast
it properly (in flexible mode), it means that it is not able to guarantee the
validity of the desired object thus it will fail.

Any issue encountered during the mapping will add an error to an upstream
exception of type `\CuyZ\Valinor\Mapper\MappingError`. It is therefore always
Expand Down

0 comments on commit 04e4479

Please sign in to comment.