Hello,

I am validating a password field as follows:

$.validator.addMethod('password', function (value, element) {
  return this.optional(element) || /^([a-zA-Z0-9]{8,24})
$/.test(value);
}, 'Use 8 to 24 letters or numbers only');

I write 8 numbers and letters. The message disappears. Fine ...

Then I write a few spaces and the message do not fire even when I
submit the form.

Then I write a few letters or numbers after the empty spaces and the
message fires again ...

Is this a bug?

Thanks,
Miguel

Reply via email to