Answer the question
In order to leave comments, you need to log in
How to display error messages using jquery Validate?
I have the following code to validate inputs:
$('.refresh').click(function() {
$('.price-filter').validate({
rules: {
price: {
required: true,
number: true
}
},
messages: {
price: {
required: "Поля ввода не должны быть пустыми",
number: "Введите цифры"
}
},
errorElement: "div",
errorPlacement: function(error, element) {
$('.error').insertAfter('.price-filter');
},
submitHandler: function() {
table.draw();
}
})
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question