You need to put all of your rules inside of theedit: OP updatedrules
option.You need to assign the rule to a field only by the field's
name
attribute.You seem to be assigning the
required
rule to theemailz
method/rule. You cannot assign a rule to a rule. Youremailz
rule can only be declared by a booleantrue
.
$('#myform').validate({ // <- initialize the plugin on form with id="myform"
rules: { // <- option
somefield: { // <- field name
emailz: true, // <- a rule/method declared
required: true // <- another rule/method declared
},
anotherfield: {
required: true
}
}
})