Skip to content

Commit 09f9d3d

Browse files
committed
[#4454] Re-wording section, but it may not actually be accurate
1 parent 0c0b708 commit 09f9d3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

book/validation.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,10 +841,11 @@ the string ``Default``.
841841
In other words, the ``Default`` group and the class name group (e.g. ``User``) are identical,
842842
except when the class is embedded in another object that's actually the one being validated.
843843

844-
In case you have inheritance in your data model and you validate with the class name of
845-
the subclass in the subclass and in the baseclass all constraints in the default group
846-
will be validated. If you use the name of the baseclass only the constraints in the base
847-
class will be validated.
844+
If you have inheritance (e.g. ``User extends BaseUser``) and you validate
845+
with the class name of the subclass (i.e. ``User``), then all constraints
846+
in the ``User`` and ``BaseUser`` will be validated. However, if you validate
847+
using the base class (i.e. ``BaseUser``), then only the constraints in
848+
the ``BaseUser`` group will be validated.
848849

849850
To tell the validator to use a specific group, pass one or more group names
850851
as the second argument to the ``validate()`` method::

0 commit comments

Comments
 (0)