I'm using following code:
$().ready(function() {
$('#state_form').validate({
rules: {
state: "required"
},
messages: {
state:
{
required: "The State is required!"
}
},
errorPlacement: function(error, element) {
alert(error.html());
}
});
});
but if the user submits the form then popup with error appears. This is correct. Then if the user clicks to the selectbox 'state' the popup with error still appears (is not possible choose correct value). The real example is available at janzitniak.info/temp/test.php
This is not acceptable. How could I resolve this problem?
The solution described at JQuery form validation with alert popup - alert still being shown with a valid submit didn't help me, maybe I didn't understand that correctly.