Validation Plugin - Tied but not working. Find somewthing wrong in this code

Validation Plugin - Tied but not working. Find somewthing wrong in this code


This smallest example is not working. I've used metadata to use validate as the attribute for apllying rules. But on submit no method is getting called


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>

<script src="/Hosannah/js/jquery/jquery-1.4.2.js" type="text/javascript"></script>











 <script src="/Hosannah/js/jquery/jquery.validate.js" type="text/javascript"></script>
<script src="/Hosannah/js/jquery/jquery.metadata.js" type="text/javascript"></script>


<script type="text/javascript" >
jquery.metadata.setType("attr", "validate");

jQuery.validator.setDefaults({
submitHandler: function() { alert("submitted!"); }
});

jQuery.validator.addMethods("conditionalMandatoryValue",function(value,element,elementName){
alert(elementName);
return $("#"+elementName.split("=")[0]).val()==elementName.split("=")[1];
},"Custom Error Message");

jQuery(document).ready(function() {
alert("of");
$("#initializeForm").validate();
alert("of");
});
</script>
</head>
<body>
<form name="initializeForm" id="initializeForm" method="get" action="/Hosannah/Welcome.do">
<div>

























 <p>Is there a claimant?
<input type="text" name="claimantPresent" maxlength="1" size="2" value="Y" onblur="this.value=='Y'?$('#firstName').show():$('#firstName').hide()" id="claimantPresent" validate="required:true">
</p>
</div>
<div>
<input type="text" name="firstName" value="" id="firstName" style="display:none" validate="conditionalMandatoryValue: claimantPresent=Y">
<input type="submit" value="Submit" class="submit">
</div>
</form>








 </body>
</html>