I am wondering if something like this is posible
.validate({
rules: {
email: {
required: true,
email: true
}
},
messages: {
email: {
required: "<?php echo get_texto_clave('error_validate_empty'); ?>",
email: 'Please enter a valid email address',
whenFieldIsValid: 'looks good'
}
}
});
To show a message, not error but a confirmation that the input is valid,
how can i do so?
You can use the
validClassoption to write this functionality. When an input is valid, the plugin will add a specified class to that element.Insert a hidden div after each of the inputs:
To hide:
In your validate statement, include the
validClassoption, as well asonkeyupandonclickif you want the messages to appear as changes are made to the form:Then CSS to display the first element of class
correctmessageafter asuccessclass (the specificity should override the other CSS block):display: inlineis also valid.