Skip to content

Commit

Permalink
Update custom_constraint.rst
Browse files Browse the repository at this point in the history
Updated custom_constraint.rst with Validator::class syntax
  • Loading branch information
DonCallisto authored and xabbuh committed Jul 4, 2017
1 parent f82712e commit 4d5b4fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validation/custom_constraint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ includes some simple default logic::
// in the base Symfony\Component\Validator\Constraint class
public function validatedBy()
{
return get_class($this).'Validator';
return ContainsAlphanumericValidator::class;
}

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

0 comments on commit 4d5b4fc

Please sign in to comment.