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

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -