http://bassistance.de/jquery-plugins/jquery-plugin-validation/ looks to be the best jquery validation plugin out there. I can't seem to get it working in the jQuery UI dialog though.
This code works outside of the dialog DIV:
<script type="text/javascript">
$(document).ready(function() {
$("form").validate();
$("a").bind("click", function() { alert($("form").valid()); });
});
</script>
<form method="get" action="">
<p>
Name
<input id="name" name="name" class="required" minlength="2" />
</p>
<p>
E-Mail
<input id="cemail" name="email" size="25" class="required email" />
</p>
<a href="#" id="clickTest">Click</a>
</form>
This works great. When i move the form into my dialog div, open dialog, and click the link it returns true, no bueno.
Is there any way to use this killer jquery validation plugin without having to use the <form> tag? Or is there an even better way of doing this successfully?