Skip to content

Commit b540980

Browse files
committed
minor #5408 typo (larsborn)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5408). Discussion ---------- typo the a is covered by a-z in the regex Commits ------- 7d56a5c typo
2 parents 606d605 + 7d56a5c commit b540980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The validator class is also simple, and only has one required method ``validate(
6464
{
6565
public function validate($value, Constraint $constraint)
6666
{
67-
if (!preg_match('/^[a-zA-Za0-9]+$/', $value, $matches)) {
67+
if (!preg_match('/^[a-zA-Z0-9]+$/', $value, $matches)) {
6868
$this->context->addViolation(
6969
$constraint->message,
7070
array('%string%' => $value)

0 commit comments

Comments
 (0)