Run validation on blur
This commit is contained in:
parent
3ecdafa685
commit
68ef618028
1 changed files with 5 additions and 0 deletions
|
@ -965,6 +965,7 @@
|
||||||
$('.js-copy-link').tooltip('hide').attr('data-original-title', '{{ trans('general.copied') }}').tooltip('show');
|
$('.js-copy-link').tooltip('hide').attr('data-original-title', '{{ trans('general.copied') }}').tooltip('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Reference: https://jqueryvalidation.org/validate/
|
||||||
$('#create-form').validate({
|
$('#create-form').validate({
|
||||||
ignore: 'input[type=hidden]',
|
ignore: 'input[type=hidden]',
|
||||||
errorClass: 'help-block form-error',
|
errorClass: 'help-block form-error',
|
||||||
|
@ -980,6 +981,10 @@
|
||||||
$(inputElement).parent().addClass('has-error');
|
$(inputElement).parent().addClass('has-error');
|
||||||
$(inputElement).closest('.help-block').remove();
|
$(inputElement).closest('.help-block').remove();
|
||||||
},
|
},
|
||||||
|
onfocusout: function(element) {
|
||||||
|
// console.log($(element).valid());
|
||||||
|
return $(element).valid();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue