Answer the question
In order to leave comments, you need to log in
Form->isValid is always true?
In the form class, all fields are defined as required
for the test in the template did so
{{ form_start( form, { attr: { "novalidate": "novalidate" } } ) }}
Answer the question
In order to leave comments, you need to log in
From documentation :
That is, the fact that your form contains fields with 'required' => true (it's the default) does not affect validation.
Therefore, $form->isValid() === true
if you do not have a Doctrine class or entity to which the form is displayed, you need to write the validation rules yourself
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question