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

Appearance settings

Commit c2db977

Browse filesBrowse files
committed
minor #8435 Fix explanation when Creating a Validator (lemonlab)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #8435). Discussion ---------- Fix explanation when Creating a Validator In the base class Symfony\Component\Validator\Constraint, the method validatedBy() contain this code instead. This makes the explanation understandable. Commits ------- 2e61702 Fix explanation when Creating a Validator
2 parents 6365c01 + 2e61702 commit c2db977
Copy full SHA for c2db977

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎validation/custom_constraint.rst

Copy file name to clipboardExpand all lines: validation/custom_constraint.rst
+1-1Lines changed: 1 addition & 1 deletion
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 ContainsAlphanumericValidator::class;
48+
return get_class($this).'Validator';
4949
}
5050

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.