Reputation: 188
i want to validate the request and send error messages and send error messages of each field in symfony. Is that possible ?
Upvotes: 0
Views: 88
Reputation: 49
You can do it like in this https://symfony.com/doc/current/validation/raw_values.html.
Or you can use FOSRestBundle. With this bundle you can use the ParamConverter with a validator option and then the errors will be injected to your controller.
Upvotes: 1