Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
the a is covered by a-z in the regex
  • Loading branch information
larsborn authored and wouterj committed Jun 20, 2015
1 parent 606d605 commit 7d56a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookbook/validation/custom_constraint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The validator class is also simple, and only has one required method ``validate(
{
public function validate($value, Constraint $constraint)
{
if (!preg_match('/^[a-zA-Za0-9]+$/', $value, $matches)) {
if (!preg_match('/^[a-zA-Z0-9]+$/', $value, $matches)) {
$this->context->addViolation(
$constraint->message,
array('%string%' => $value)
Expand Down

0 comments on commit 7d56a5c

Please sign in to comment.