I am trying to check specific form field is valid or not on button click event but not working.
I have included this jQuery library:
<script type='text/javascript' src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8/jquery.validate.min.js"></script>
and jQuery code:
<script type='text/javascript'>//<
Any idea why it is not working.
Thanks.
There is no element in your code with ID as brokercat, #brokercat is an ID based selector. It is the name attribute.
Use
$("[name='brokercat']").valid()  //returns 0 or 1
$(".next").click(function () {
    alert($("[name='brokercat']").valid());
}); 
Demo
*Note : Make sure you include both jQuery and jQuery.validate.js references which are compatible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With