i have this function:
public static function encPasswordCheckFailed($password)
{
if (!preg_match('/[A-Z]+/', $password)){
return true;
}
if (!preg_match('/[a-z]+/', $password)){
return true;
}
if (!preg_match('/[0-9]+/', $password)){
return true;
}
if (!preg_match('/[!@#$%^&*()-+<>]+/', $password)) {
return true;
}
return false;
}
and now i want to force the user to have at least 1 Uppercased Letter, 1 Lowercased Letter, 1 Number and 1 Specialcharacter.
I'm having the problem with this:
if (!preg_match('/[!@#$%^&*()-+<>]+/', $password)) {
return true;
}
All other requirements work. I have only a problem with the specialcharacters.
Can someone tell me the correct pattern for these specialcharacters: !@#$%^&*()-+<>
i've read some of the answers from here, here and here but they didn't help me further...