JQuery.validate – one rule on blur only; the rest should be normal?

Quote Title: “one rule on blur only; the rest should be normal?”

No, the various triggering events, like onfocusout, onkeyup, etc., are triggered on a “per field” basis. You cannot have one rule on a field, say min, triggered normally on all events, while another rule for the same field, say remote, is triggered only by onfocusout. (You can, however, have different events for different fields).

In most of the SO threads on this topic I’ve seen, the user will disable onkeyup in order to prevent the constant premature triggering of the remote rule. When testing a re-captcha code, for example, disabling onkeyup is required as a new code is generated every time one fails.

Leave a Comment