File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,8 @@ Before using validation, add support for it in your application:
461
461
$ composer require symfony/validator
462
462
463
463
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.
465
466
466
467
To see the first approach - adding constraints to the entity - in action,
467
468
add the validation constraints, so that the ``task `` field cannot be empty,
@@ -546,9 +547,8 @@ object.
546
547
That's it! If you re-submit the form with invalid data, you'll see the
547
548
corresponding errors printed out with the form.
548
549
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.
552
552
553
553
Other Common Form Features
554
554
--------------------------
You can’t perform that action at this time.
0 commit comments