codepuppy — 2012-06-23T12:25:13-04:00 — #1
I have a Jquery script employing some regex to valid some input. This works fine except if I type very rapidly the script gets confused.
I have tried to apply setTimeout without success.
Is there a way of buffering the input so that I can deal with each key stroke in turn? or simply discard any keystroke that occurs between the keyup event and the completion of it's event handler?
paul_wilkins — 2012-06-24T03:31:24-04:00 — #2
It's typically a bad idea to validate on a per-keystroke basis. Have you tried validating on the onblur event instead, which triggers when someone moves away from the field?