Run validation on blur

This commit is contained in:
Marcus Moore 2023-11-14 16:30:29 -08:00
parent 3ecdafa685
commit 68ef618028
No known key found for this signature in database

View file

@ -965,6 +965,7 @@
$('.js-copy-link').tooltip('hide').attr('data-original-title', '{{ trans('general.copied') }}').tooltip('show');
});
// Reference: https://jqueryvalidation.org/validate/
$('#create-form').validate({
ignore: 'input[type=hidden]',
errorClass: 'help-block form-error',
@ -980,6 +981,10 @@
$(inputElement).parent().addClass('has-error');
$(inputElement).closest('.help-block').remove();
},
onfocusout: function(element) {
// console.log($(element).valid());
return $(element).valid();
},
});