UPDATE: getting validate() to work with ajaxForm() was really easy. I’m loving life. All I had to do was add one level of redirection to the ajaxForm call:
$("form").submit(function() {
$(this).ajaxSubmit();
return false; // prevent default
});
I just added Jörn Zaefferer’s jQuery Validation Plugin to some code I’m writing. What a great piece of work. Jörn Zaefferer also developed the autocomplete plugin I really like for jQuery.
One gotcha: it’s easy with these Ajaxy development paradigms to forget the essentials. For this to work in a “batch” mode (i.e. all at once, instead of item by item), you need to make sure your form elements have the name= attribute. I’ve gotten lazy and used to using #ids pretty regularly.
One other thing I’m currently working on: getting it to coexist peacefully with the jQuery Forms plugin. I’m sure there’s some way I can interrupt the ajaxForm method from being called if I run into a validation error.









