@@ -772,7 +772,7 @@ With this configuration, there are two validation groups:
772
772
* ``Default `` - contains the constraints not assigned to any other group;
773
773
774
774
* ``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 `);
776
776
777
777
* ``registration `` - contains the constraints on the ``email `` and ``password ``
778
778
fields only.
@@ -798,14 +798,16 @@ Group Sequence
798
798
--------------
799
799
800
800
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.
803
803
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.
806
808
807
809
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
809
811
(in order to avoid multiple error messages).
810
812
811
813
.. configuration-block ::
@@ -908,9 +910,9 @@ username and the password are different only if all other validations passes
908
910
}
909
911
}
910
912
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.
914
916
915
917
.. _book-validation-raw-values :
916
918
0 commit comments