Want more coding tutorials like this do check our coding projects page there we have awesome coding projects done you can visit here – Visit coding projects.
- We want the entered number to be exactly 10 digits.
- The number should not contain any alphabets, only numbers.
- The field cannot be empty
- If any errors show on the screen
Add the HTML code
Then inside the form add a number input the create an input tag and select the type to number like this and add an id to the input also. Add the required attribute to the input. The number input will only allow numbers to be entered.
I hope I solved your problem from this tutorial:
- Mobile number validation in HTML
This was for today if you want coding guides in HINDI then you can visit our Hindi coding blog here –Hindi coding blog.
Thank you for reading, have a nice day 🙂