Require numbers OR special chars for passwords, not AND
This commit is contained in:
parent
e18b649250
commit
589161219f
|
@ -244,11 +244,8 @@ final class MD_STD_IN {
|
||||||
$errors[] = 'password_too_short';
|
$errors[] = 'password_too_short';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((\preg_match('@[0-9]@', $input)) === false) {
|
if (!(\preg_match('@[0-9]@', $input)) && !(\preg_match('@[^\w]@', $input))) {
|
||||||
$errors[] = 'password_has_no_number';
|
$errors[] = 'password_has_no_number_no_special_char';
|
||||||
}
|
|
||||||
if ((\preg_match('@[^\w]@', $input)) === false) {
|
|
||||||
$errors[] = 'password_has_no_special_char';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user