Open bmoinet opened 10 years ago
The JS script used :
$(document).ready(function(){
/**
* Search Form Submit Behavior
*/
$('#recherche #submit_btn').on('click', function(e) {
var form = $(this).closest('form');
var isValid = form.valideasy({
mode: 'unified',
errorElementId: 'errors',
stepByStep: true,
disableFieldStyle: true
});
if (isValid) {
form.submit();
}
return isValid;
});
});
If you have an div to display error messages and this div is not empty, then the plugin doesn't work corretly (the message is not displayed). You then have to give focus to the field before to submit the form and then have the message. Ex:
=> OK
=> KO
Form example :