Skip to content

Commit c0743c0

Browse files
Update without_class.rst
1 parent f027130 commit c0743c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form/without_class.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ but here's a short example::
9999
'constraints' => new Length(['min' => 3]),
100100
])
101101
->add('lastName', TextType::class, [
102-
// the following configuration triggers an error `An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\FormType": The option "constraints" with value array is expected to be of type "Symfony\Component\Validator\Constraint" or "Symfony\Component\Validator\Constraint[]", but one of the elements is of type "array".`
102+
.. the following configuration triggers an error `An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\FormType": The option "constraints" with value array is expected to be of type "Symfony\Component\Validator\Constraint" or "Symfony\Component\Validator\Constraint[]", but one of the elements is of type "array".` ..
103103
'constraints' => [
104104
new NotBlank(),
105105
new Length(['min' => 3]),
@@ -167,7 +167,7 @@ This can be done by setting the ``constraints`` option in the
167167
This means you can also do this when using the ``createFormBuilder()`` method
168168
in your controller::
169169

170-
// the following configuration triggers an error `An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\FormType": The option "constraints" with value array is expected to be of type "Symfony\Component\Validator\Constraint" or "Symfony\Component\Validator\Constraint[]", but one of the elements is of type "array".`
170+
.. the following configuration triggers an error `An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\FormType": The option "constraints" with value array is expected to be of type "Symfony\Component\Validator\Constraint" or "Symfony\Component\Validator\Constraint[]", but one of the elements is of type "array".` ..
171171
172172
173173
$form = $this->createFormBuilder($defaultData, [

0 commit comments

Comments
 (0)