Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Validator] Adding support for Closure in CallbackValidator
Usage: $formBuilder = $this->get('form.factory') ->createBuilder('form'); $formBuilder->setAttribute('validation_constraint', new Callback(array("methods"=>array( 'validate' => function ($data, $context) use ($elements) { // logic to add violations depending on the elements } ))));
- Loading branch information