How to stop check for failure restrictions in Symfony2

If I have many validators against my object, can I somehow indicate that it will stop the rest if it does not work? IE: there is no Permission checkpoint if NotBlank does not work.

Alternatively, if it is not built-in, perhaps this is a way to signal that the chart is moving, and I can put it in a validator that checks for previous errors and stops the spread on the chart.

+8
php validation symfony chain
source share
1 answer

If you set the check in ./app/config/validation.yml , then SF2 will check as the order of the checks in the file. Once the check is not completed, it ignores the rest.

+1
source share

All Articles