Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGuilloux committed Oct 9, 2019
1 parent adedbd8 commit b741219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Bug fix:
* The `@Assert\DateTime` and `@Assert\Date` will now transform the property type in `DateTime` if no type is set.
* You can now add a type that is forced to optional. Check the [documentation](Doc/ParamConverter.md#force-optional-configuration).
* You can now add a type to bypass the exception thrown by a `ParamConverter`. Check the [documentation](Doc/ParamConverter.md#bypass-paramconverter-exception-for-specific-classes).


## 2.1.1
Expand Down
4 changes: 2 additions & 2 deletions Doc/ParamConverter.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public function postAction(
}
```

### Force optional configuration
### Bypass `ParamConverter` exception for specific classes

Some `ParamConverter` will throw an exception in case of a bad input. This is the case of the `DateTimeParamConverter` which will throw a 404 Not Found error if it fails to transform the input in date, when you give no value for instance. A 404 is not appropriated in most cases, especially if you have the `NotBlank` or `NotNull` assertion which will handle better the error.
Some `ParamConverter` will throw an exception in case of a bad input. This is the case of the `DateTimeParamConverter` which will throw a 404 Not Found error if it fails to transform the input in date, when you give no value for instance. A 404 is not appropriated in most cases, especially if you have the `NotBlank` or `NotNull` assertion which will better handle the error.

To bypass it, you can set the following options. This is the default value.

Expand Down

0 comments on commit b741219

Please sign in to comment.