Answer the question
In order to leave comments, you need to log in
How to specify an element during validation?
I use the jqueryvalidation.org
plugin and
do it like this:
$("#add_form").validate({
rules:{
title:{
required: true,
minlength: 5,
maxlength: 80
}
},
messages:{
title:{
required: "Это поле обязательно для заполнения",
minlength: "Минимум {0} символов",
maxlength: "Максимум {0} символов",
},
},
});
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