Answer the question
In order to leave comments, you need to log in
How to check on JS the phone number is entered in Input or not?
Good afternoon.
There is an Input field for entering a phone number, in this js field there is a mask for entering a phone number.
It is necessary to understand whether the field is filled in by the user or not?
Previously, I usually checked through length for the length of the entered data, but here a mask is applied - and the console says that there are already 17 characters. How to correctly check the filling of a phone number?
Thank you.
Answer the question
In order to leave comments, you need to log in
First, remove all characters except numbers, only then check the length of the phone number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question