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?
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?
This topic is now closed. New replies are no longer allowed.