Skip to content

Commit 79af2c1

Browse files
committed
minor #53 split the Validation chapter (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- split the Validation chapter Commits ------- a2c301a split the Validation chapter
2 parents 6938b8c + a2c301a commit 79af2c1

File tree

6 files changed

+584
-637
lines changed

6 files changed

+584
-637
lines changed

bundles/override.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ combines them into one validation metadata tree. This means you are able to
127127
add new constraints to a property, but you cannot override them.
128128

129129
To override this, the 3rd party bundle needs to have configuration for
130-
:ref:`validation groups <book-validation-validation-groups>`. For instance,
131-
the FOSUserBundle has this configuration. To create your own validation, add
132-
the constraints to a new validation group:
130+
:doc:`validation groups </validation/groups>`. For instance, the FOSUserBundle
131+
has this configuration. To create your own validation, add the constraints
132+
to a new validation group:
133133

134134
.. configuration-block::
135135

forms.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Validation is a very powerful feature of Symfony and has its own
467467
Validation Groups
468468
~~~~~~~~~~~~~~~~~
469469

470-
If your object takes advantage of :ref:`validation groups <book-validation-validation-groups>`,
470+
If your object takes advantage of :doc:`validation groups </validation/groups>`,
471471
you'll need to specify which validation group(s) your form should use::
472472

473473
$form = $this->createFormBuilder($users, array(
@@ -595,7 +595,7 @@ of the entity as well you have to adjust the option as follows::
595595
}
596596

597597
You can find more information about how the validation groups and the default constraints
598-
work in the book section about :ref:`validation groups <book-validation-validation-groups>`.
598+
work in the book section about :doc:`validation groups </validation/groups>`.
599599

600600
.. index::
601601
single: Forms; Validation groups based on clicked button
@@ -1899,6 +1899,8 @@ an array.
18991899
a better choice, since it returns the data (usually an object) after
19001900
it's been transformed by the Form component.
19011901

1902+
.. _booking-validation-forms:
1903+
19021904
Adding Validation
19031905
~~~~~~~~~~~~~~~~~
19041906

@@ -1915,7 +1917,7 @@ simple array of your submitted data, how can you add constraints to the data of
19151917
your form?
19161918

19171919
The answer is to setup the constraints yourself, and attach them to the individual
1918-
fields. The overall approach is covered a bit more in the :ref:`validation chapter <book-validation-raw-values>`,
1920+
fields. The overall approach is covered a bit more in the :doc:`validation chapter </validation/raw_values>`,
19191921
but here's a short example:
19201922

19211923
.. code-block:: php

0 commit comments

Comments
 (0)