Skip to content

Commit 48db377

Browse files
committed
minor #8092 Update custom_constraint.rst (DonCallisto)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #8092). Discussion ---------- Update custom_constraint.rst Updated custom_constraint.rst with Validator::class syntax Commits ------- 4d5b4fc Update custom_constraint.rst
2 parents f82712e + 4d5b4fc commit 48db377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation/custom_constraint.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ includes some simple default logic::
4545
// in the base Symfony\Component\Validator\Constraint class
4646
public function validatedBy()
4747
{
48-
return get_class($this).'Validator';
48+
return ContainsAlphanumericValidator::class;
4949
}
5050

5151
In other words, if you create a custom ``Constraint`` (e.g. ``MyConstraint``),

0 commit comments

Comments
 (0)