I have a validation rule where a password must be 6 characters or more. But this validation rule is not satisfied/fails is the users password contains special characters.
For example; a password such as @ _a&^
results in the validator saying Password must be 6 or more characters in length.
. Maybe the validator doesn't count special characters? A password such as abc123
is ok and the validator works (doesn't complain). password such as abc
the validator works and displays the error message.
How can I get the validator to count special characters? Am I just going to have to roll my own validator?
validation: function () {
return {
password: [
{ required: true, msg: _('Password is required.').translate() }
, { length: 6, msg: _('Password must be 6 or more characters in length.').translate() }
]
, password2: [
{ required: true, msg: _('Password is required').translate() }
, { equalTo: 'password', msg: _('Password and Confirm Password do not match').translate() }
]
}
}