Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update without_class.rst #20487

Open
wants to merge 2 commits into
base: 7.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion form/without_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
'constraints' => new Length(['min' => 3]),
])
->add('lastName', TextType::class, [
'constraints' => [
.. 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".` ..

Check failure on line 102 in form/without_class.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please use 2 backslashes when highlighting a namespace with single backticks: `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".`

Check failure on line 102 in form/without_class.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[PHP syntax] Syntax error, unexpected '}', expecting ',' or ']' or ')'
'constraints' => [

Check failure on line 103 in form/without_class.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please remove trailing whitespace
new NotBlank(),
new Length(['min' => 3]),
],
Expand Down Expand Up @@ -166,6 +167,9 @@
This means you can also do this when using the ``createFormBuilder()`` method
in your controller::

.. 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".` ..

Check failure on line 170 in form/without_class.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please use 2 backslashes when highlighting a namespace with single backticks: `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".`


$form = $this->createFormBuilder($defaultData, [
'constraints' => [
'firstName' => new Length(['min' => 3]),
Expand Down
Loading