I am trying to check, if a user has created a password that contains symbols (including +,-,= signs) OR/AND numbers. How can I do that?
function check_password($str)
{
if (!preg_match ("/[&@<>%\*\,\^!#$%().]/i", $str))
{
$this->form_validation->set_message('check_password', 'Your password should contain a number,letter,and special characters"');
return FALSE;
}
else
{
return TRUE;
}
}
Thanks.