Thursday, July 23, 2015

To create completely custom validation rules and to assign any validation errors to specific fields on your object

The purpose of the Callback constraint is to create completely custom validation rules and to assign any validation errors to specific fields on your object. If you're using validation with forms, this means that you can make these custom errors display next to a specific field, instead of simply at the top of your form.

Reference:

http://symfony.com/doc/current/reference/constraints/Callback.html

No comments: