8000 typo · symfony/symfony-docs@7d56a5c · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d56a5c

Browse files
larsbornwouterj
authored andcommitted
typo
the a is covered by a-z in the regex
1 parent 606d605 commit 7d56a5c

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)
0