I have rules for password, the rules is:
Only alphanumeric characters, spaces, dashes, periods, and underscores are allowed.
in Users model i use validation like bellow
'password'=>array('required', 'min:8', 'max:20', 'regex:[A-Za-z\s\-\._]')
when the form submitted, it throw error The password format is invalid.
. what could be wrong with my regex?
PS: i input 12345678 in password field.