Closed
Description
I have posted that issue also at http://forum.jquery.com/topic/jquery-vaidation-groups-does-not-work-as-expected
Her is a copy:
Please have a look at the online example for the groups option on http://docs.jquery.com/Plugins/Validation/validate. To make sure I will copy the source here now:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
<script>
$(document).ready(function(){
$("#myform").validate({
groups: {
username: "fname lname"
},
errorPlacement: function(error, element) {
if (element.attr("name") == "fname" || element.attr("name") == "lname" )
error.insertAfter("#lastname");
else
error.insertAfter(element);
},
debug:true
})
});
</script>
Metadata
Metadata
Assignees
Labels
No labels