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

Commit1bcc30f

Browse files
committed
minor#7249 [Validator] Fixed wrong inheritance information (peterrehm)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes#7249).Discussion----------[Validator] Fixed wrong inheritance informationThere is wrong information about the inheritance of validation groups.I have tested it extensively and some findings are documented here:symfony/symfony#20857I also asked Bernhard about what the intended behavior is, but I assumeas I have documented it now was the original expected behaviour.Commits-------49dfdf4 Fixed wrong inheritance information
2 parents27aa549 +49dfdf4 commit1bcc30f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎validation/groups.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ the class name or the string ``Default``.
166166
object that's actually the one being validated.
167167

168168
If you have inheritance (e.g. ``User extends BaseUser``) and you validate
169-
with the class name of the subclass (i.e. ``User``), thenall constraints
170-
in the ``User``and ``BaseUser``will be validated.However, if you
171-
validate using the base class(i.e. ``BaseUser``), then only the default
172-
constraints in the ``BaseUser`` class will be validated.
173-
169+
with the class name of the subclass (i.e. ``User``), thenonly constraints
170+
in the ``User`` will be validated.To validate the parent constraints as
171+
  well you need to provide multiple groups(i.e ``User`` and ``BaseUser``) or
172+
   ``Default``.
173+
174174
To tell the validator to use a specific group, pass one or more group names
175175
as the third argument to the ``validate()`` method::
176176

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp