I have created a search form on the fly in my controller to list users by nicknames / names:
$form = $this->createFormBuilder()
->add('username', 'search', array('required'=> false))
->add('name', 'search', array('required'=> false))
->add('submit', 'submit')
->getForm();
So, because this form isn't mappped in my database, I don't use any Assert.
My question : I don't know if I have to use isValid() because I don't know if this method does the same as get(‘validator’)->validate()
, (then I wouldn't need it), or if it checks other interresting things.
Thanks for help, have a nice day!