// fix on front validators
This commit is contained in:
@@ -22,14 +22,12 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('input.validate, textarea.validate').on('keyup', function() {
|
||||
if ($(this).hasClass('is_required') || $(this).val().length)
|
||||
{
|
||||
if (window['validate_'+$(this).attr('data-validate')]($(this).val()))
|
||||
$(this).parent().removeClass('form-error').addClass('form-ok');
|
||||
else
|
||||
$(this).parent().addClass('form-error').removeClass('form-ok');
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('keyup', 'input.validate, textarea.validate', function() {
|
||||
if ($(this).hasClass('is_required') || $(this).val().length)
|
||||
{
|
||||
if (window['validate_'+$(this).attr('data-validate')]($(this).val()))
|
||||
$(this).parent().removeClass('form-error').addClass('form-ok');
|
||||
else
|
||||
$(this).parent().addClass('form-error').removeClass('form-ok');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user