When jQuery validation error messages appear, they take up space and push other fields downwards. I want the error messages to adjust within the available space and not disrupt other fields or elements. Below is the jQuery validation code I'm currently using.
$(document).ready(function(){
jQuery("#frmQuickAdd").validate({
errorElement:'div',
rules: {
t_style: {
required: true
}
},
messages: {
t_style: {
required: "Please select therapy style"
}
}
});
});
I have tried using div, label, and span in errorElement:'', but I am still facing the same issue. The error div by default is taking the class 'error'. Any suggestions for what CSS I should write to resolve this?