From 77b480da7ad192cfaba3831745448569251fe086 Mon Sep 17 00:00:00 2001 From: Phil Rennie Date: Thu, 12 Feb 2015 18:46:30 +0000 Subject: [PATCH] Update PasswordRequirementsValidator.php requireSpecialCharacter regex will currently match against numeric characters, added numeric to the list of excluded matches in the regex. --- src/Validator/Constraints/PasswordRequirementsValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Validator/Constraints/PasswordRequirementsValidator.php b/src/Validator/Constraints/PasswordRequirementsValidator.php index b06b11c..3e4c965 100644 --- a/src/Validator/Constraints/PasswordRequirementsValidator.php +++ b/src/Validator/Constraints/PasswordRequirementsValidator.php @@ -69,7 +69,7 @@ public function validate($value, Constraint $constraint) } if ($constraint->requireSpecialCharacter && - !preg_match('/[^p{Ll}\p{Lu}\pL]/', $value) + !preg_match('/[^p{Ll}\p{Lu}\pL\pN]/', $value) ) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->missingSpecialCharacterMessage)