Skip to content

Commit f8edb07

Browse files
committed
minor #16834 [Validator] Update validation.rst (mohamedGasmii)
This PR was submitted for the 6.0 branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- [Validator] Update validation.rst Constraints works also on private and protected methods whose name starts with "get", "is" or "has". Commits ------- 38573bb [Validator] Update validation.rst
2 parents 430f4ef + 38573bb commit f8edb07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

validation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ of the form fields::
453453
Constraint Targets
454454
------------------
455455

456-
Constraints can be applied to a class property (e.g. ``name``), a public
457-
getter method (e.g. ``getFullName()``) or an entire class. Property constraints
456+
Constraints can be applied to a class property (e.g. ``name``),
457+
a getter method (e.g. ``getFullName()``) or an entire class. Property constraints
458458
are the most common and easy to use. Getter constraints allow you to specify
459459
more complex validation rules. Finally, class constraints are intended
460460
for scenarios where you want to validate a class as a whole.
@@ -555,7 +555,7 @@ Getters
555555
~~~~~~~
556556

557557
Constraints can also be applied to the return value of a method. Symfony
558-
allows you to add a constraint to any public method whose name starts with
558+
allows you to add a constraint to any private, protected or public method whose name starts with
559559
"get", "is" or "has". In this guide, these types of methods are referred to
560560
as "getters".
561561

0 commit comments

Comments
 (0)