I'm trying to use the jQuery Validation plug-in on a form on my site. Two problems -- it doesn't seem to work and I want to use alert boxes for the errors.
Here's the code:
Any ideas why this isn't working? And how do I configure it to use alert boxes as opposed to inline errors?Code:<script type="text/javascript"> jQuery.validator.addMethod( "require_categories", function(value, element) { if (element.value == 0) { return false; } else { return true; }, "Please select an option." }); $("#publishForm").validate({ rules: { category: { require_categories: true } } }); </script> <form id="publishForm" method="post"> <select name="category[]" id="county"> <option value="">--</option> <option value="1">County Name</option> ... </select> </form>
Thank you for your help.


Reply With Quote
Bookmarks