How can i achieve that password have (backward slash,forward slash,single quote,double quotes) then and then only it will not allow else it will return true using custom validation.i don't have much idea about preg_match so all suggestions are acceptable.
I have tried below code to achieve that but can't get success.
So anyone have some suggestions/idea ?
php code :
public function check_password($str){
return ( !preg_match("/^[a-z0-9!@#$%^&*()_-+|;:<>,.?]+$/i", $str)) ? FALSE : TRUE;
}
if i will put exclude(backward slash,forward slash,single quote,double quotes) then it must allow me to store password in database
For example :
Password : !@#$%^&*()_-+| ;:<>, // true
Password : /12345 //false
Password : 1Aa3!@#$%^&*()_-+| ;:<> //true(here white space also allowed)