|
Title: validatebox: how to prevent check on each keystroke Post by: Ellipsis on October 25, 2012, 01:33:47 AM We defined some custom validates with an external resource (does the given ID exist for example)
The problem is that validatebox fires that request every keystroke, I tried adjusting the custom check to wait until a certain length of the given value but this is not a good solution. We only want the boxes to be 'validated' on 'blur'(=leaving input) or on submit. Title: Re: validatebox: how to prevent check on each keystroke Post by: stworthy on October 25, 2012, 06:41:47 AM To disable validating when the input box got focus, bind a 'focus' event on this input box and set the inner variable 'validating' to false. The code looks like this:
Code: $('#box').bind('focus',function(){Title: Re: validatebox: how to prevent check on each keystroke Post by: Ellipsis on October 25, 2012, 08:57:55 AM Thank you!
|