Skip to content

Commit

Permalink
bug #42 Update PasswordRequirementsValidator.php (philrennie)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

requireSpecialCharacter regex will currently match against numeric characters, added numeric to the list of excluded matches in the regex.

Commits
-------

77b480d Update PasswordRequirementsValidator.php
  • Loading branch information
sstok committed Feb 13, 2015
2 parents e2eed5e + 77b480d commit d65d8f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d65d8f1

Please sign in to comment.