Skip to content

Commit a2cd5c7

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Form] Improve form validation section
2 parents 7bad6b6 + 571c7d7 commit a2cd5c7

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
@@ -468,7 +468,8 @@ Before using validation, add support for it in your application:
468468
$ composer require symfony/validator
469469
470470
Validation is done by adding a set of rules, called (validation) constraints,
471-
to a class. You can add them either to the entity class or to the form class.
471+
to a class. You can add them either to the entity class or by using the
472+
:ref:`constraints option <reference-form-option-constraints>` of form types.
472473

473474
To see the first approach - adding constraints to the entity - in action,
474475
add the validation constraints, so that the ``task`` field cannot be empty,
@@ -553,9 +554,8 @@ object.
553554
That's it! If you re-submit the form with invalid data, you'll see the
554555
corresponding errors printed out with the form.
555556

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

560560
Other Common Form Features
561561
--------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy