mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Run validation on blur
This commit is contained in:
parent
3ecdafa685
commit
68ef618028
|
@ -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();
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue