Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1b60ec

Browse filesBrowse files
committed
[symfony#2647] Minor tweaks to new validation group sequence docs
1 parent 5676172 commit a1b60ec
Copy full SHA for a1b60ec

File tree

Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed

‎book/validation.rst

Copy file name to clipboardExpand all lines: book/validation.rst
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ With this configuration, there are two validation groups:
772772
* ``Default`` - contains the constraints not assigned to any other group;
773773

774774
* ``User`` - contains the constraints that belongs to group ``Default``
775-
(this group is usefull for :ref:`book-validation-group-sequence`);
775+
(this group is useful for :ref:`book-validation-group-sequence`);
776776

777777
* ``registration`` - contains the constraints on the ``email`` and ``password``
778778
fields only.
@@ -798,14 +798,16 @@ Group Sequence
798798
--------------
799799

800800
In some cases, you want to validate your groups by steps. To do this, you can
801-
use the ``GroupSequence`` feature. In the case an object defines a group sequence,
802-
the groups in the group sequence will be validated in order.
801+
use the ``GroupSequence`` feature. In the case, an object defines a group sequence,
802+
and then the groups in the group sequence are validated in order.
803803

804-
Group sequences cannot contain the group ``Default``, this would create a
805-
cycle, but need to contain the group ``{ClassName}`` instead.
804+
.. tip::
805+
806+
Group sequences cannot contain the group ``Default``, as this would create
807+
a loop. Instead, use the group ``{ClassName}`` (e.g. ``User``) instead.
806808

807809
For example, suppose you have a ``User`` class and want to validate that the
808-
username and the password are different only if all other validations passes
810+
username and the password are different only if all other validation passes
809811
(in order to avoid multiple error messages).
810812

811813
.. configuration-block::
@@ -908,9 +910,9 @@ username and the password are different only if all other validations passes
908910
}
909911
}
910912
911-
In this example, it will first validate all constraints in group ``User``
912-
(eg. ``Default``). Only if all constraints in that group are valid, the second
913-
group, ``Strict``, will be validated.
913+
In this example, it will first validate all constraints in the group ``User``
914+
(which is the same as the ``Default`` group). Only if all constraints in
915+
that group are valid, the second group, ``Strict``, will be validated.
914916

915917
.. _book-validation-raw-values:
916918

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.