php - Symfony2, difference between isValid() and $this->get('validator') -
i'm new in symfony2 , wish know what's difference of validate form between:
$form->isvalid()
and
$this->get('validator')->validate($form->getdata())
using validation rules in validations.yml
thank you!
the validator, in case, checks object form bound. form::isvalid()
method, besides, checks form status (whether form submitted, whether disabled).
Comments
Post a Comment