I'm using the jQuery Validate Plugin and I want to be able to hide the error messages next to my inputs and have a main error message at the bottom, I have this working kind of but the error messages are showing next to my input fields. (Obviously I would clean up the styling if i was using it).
As you can see at the bottom it is telling me there are 4 errors see details below.. I want this to stay but not the error messages and styling above?
$( ".form-group-rules" ).validate({
rules: {
rule_name: {
required: true
},
rule_desc: {
required: false
},
rule_type: {
required: true
},
vali_type: {
required: true
},
tran_type: {
required: true
},
vali_fields: {
required: true
},
acct_sel: {
required: true
}
},
messages: {
rule_name: "Please enter a rule name",
rule_type: "Please select a rule type",
vali_fields: "Please select a validation field",
tran_type: "Please select at least 1 transaction type",
vali_type: "Please select a valiation type",
acct_sel: "Please select at least 1 account"
},
showErrors: function(errorMap, errorList) {
$(".error-container").html("Your form contains "
+ this.numberOfInvalids()
+ " errors, see details below.");
this.defaultShowErrors();
}
});