Skip to content

Commit 87642ea

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Form] Improve form validation section
2 parents 9d6be20 + a2cd5c7 commit 87642ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

forms.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ Before using validation, add support for it in your application:
461461
$ composer require symfony/validator
462462
463463
Validation is done by adding a set of rules, called (validation) constraints,
464-
to a class. You can add them either to the entity class or to the form class.
464+
to a class. You can add them either to the entity class or by using the
465+
:ref:`constraints option <reference-form-option-constraints>` of form types.
465466

466467
To see the first approach - adding constraints to the entity - in action,
467468
add the validation constraints, so that the ``task`` field cannot be empty,
@@ -546,9 +547,8 @@ object.
546547
That's it! If you re-submit the form with invalid data, you'll see the
547548
corresponding errors printed out with the form.
548549

549-
To see the second approach - adding constraints to the form - and to
550-
learn more about the validation constraints, please refer to the
551-
:doc:`Symfony validation documentation </validation>`.
550+
To see the second approach - adding constraints to the form - refer to
551+
:ref:`this section <form-option-constraints>`. Both approaches can be used together.
552552

553553
Other Common Form Features
554554
--------------------------

0 commit comments

Comments
 (0)