I've been trying to use the jquery .validate() command on a form. I have the validation library appropriately linked as the help files on google say. Yet, when I press submit, the form submits and the validation script doesn't seem to run. This is my script:
Code:
When I open the Javascript console, no errors show up. What am I doing wrong?
ps: all of these identifiers (site_title, site_tag, etc) come from the "name" attribute of a part of the form.
Code:
<script type="text/javascript">
$(document).ready(function(){
...
...
...
$("#createpage").validate({
rules: {
site_title: "required",
site_tag: "required",
pages: "required",
color: "required",
standard: "required",
url_admin: { required "#admin:unchecked" },
user_admin: { required "#admin:unchecked" },
pass_admin: { required "#admin:unchecked" }
}
});
});
</script>
When I open the Javascript console, no errors show up. What am I doing wrong?
ps: all of these identifiers (site_title, site_tag, etc) come from the "name" attribute of a part of the form.