In the documentation is said that we can apply a complex constraint on a query param like:
@QueryParam(
array=true,
name="filters",
requirements=@MyComplexConstraint,
description="List of complex filters"
)
taken from https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/3-listener-support.md
But when I try to use it in my project:
@Annotations\QueryParam(
name="departurePoint",
array=true,
strict=true,
requirements=@DeparturePoint,
nullable=false,
description="The destination from where to start the journey"
)
with the proper use of DeparturePoint, which is implemented as a symfony constraint, it throws an error saying that requirements parameter can only be a string.
Is it possible to use a custom validator for a queryParam?