FriendsOfSymfony/FOSRestBundle — pull request #700 by ClementGautier (2014-03-05 13:56:40+00:00)
Title: [WIP] Added the validator option

Hi friends of Symfony :)

For business needs, I want that my API allows some complex `QueryParams` like deep array structures. For example I want to be able to query `/api/users?filters[0][key]=name&filters[0][operator]=equals&filters[0][value]=Foobar`.

I wanted those parameters validated in order to return a `BadRequestResponse` like its did using the `requirements` of the `QueryParam` or `RequestParam` so I added an option: `constraint` and this constraint is validated by the Validator component.

Actually the option is named `validator` but I realize writing the PR that `constraint` is more appropriate so i'll change it. I need to write some tests and update the documentation too, it will be ready in an hour I guess.

`requirements` and `constraint` cannot be combined.