jqBootstrapValidation on input type number
As far as I understand, jqBootstrapValidation should automatically
validate html5 elements, like this:
<input type="number" class="form-control" name="ordPrice"
placeholder="Price" data-validation-number-message="Not a number">
But, it doesn't. Here is my js bind:
$('#create_form').find('input,select,textarea').not('[†ype="submit"],
[type="file"]').jqBootstrapValidation({
preventSubmit: true,
submitError: function($form, event, errors) {
console.log('error!');
},
submitSuccess: function($form, event) {
console.log('success!');
event.preventDefault();
},
filter: function() {
return $(this).is(':visible');
}
});
Am I missing something very elementary here?
No comments:
Post a Comment