Below is my rule for password:
return [
'Password' => 'required|min:8|max:100|regex:[a-z{1}[A-Z]{1}[0-9]{1}]',
'Password_confirmation' => 'required|min:8|max:100|regex:[a-z{1}[A-Z]{1}[0-9]{1}]',
];
I am trying to add the rule such that it must have
- atleast one small char
- atleast one big char
- atleast one number
- atleast one special char
- min 8 chars
I tried this and it works required|confirmed|min:8|max:100|regex:/^[\w]{1,}[\W]{1,}$/, on a regex tester software . but not sure why it does not work in Laravel
Am I missing something ?