Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita1b60ec

Browse files
committed
[symfony#2647] Minor tweaks to new validation group sequence docs
1 parent5676172 commita1b60ec

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

‎book/validation.rst

Lines 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 isusefull for:ref:`book-validation-group-sequence`);
775+
(this group isuseful 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 sequencewill be validated in order.
801+
use the ``GroupSequence`` feature. In the case, an object defines a group sequence,
802+
and thenthe groups in the group sequenceare 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 othervalidations passes
810+
username and the password are different only if all othervalidation 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 inthegroup ``User``
914+
(which is the same as the``Default`` group). Only if all constraints in
915+
that group are valid, the secondgroup, ``Strict``, will be validated.
914916

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp