Answer the question
In order to leave comments, you need to log in
Why does the validator give an error when everything is correct?
Hello everyone
. This question: I have a form on the site with a phone number, message, email and name
The form is not sent, because the phone is always wrong, I can not understand why.
And so, html:
<div class="input-wrap f_left">
<input type="text" name="number" class="number" placeholder="Телефон">
</div>
rules: {
'number': {
required: true,
characters: true
}
}
//Specify the validation error messages
messages: {
'number': {
required: "Введите номер",
characters: "Введите номер"
}
}
$('.number').mask("+38(099) 999-99-99");
aria-invalid="true"
aria-required="true"
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