typingsThu, 15 Dec 2022
regular expression for mobile no. length must be 10 in js
var mobile = document.getElementById('mobile'); mobile.addEventListener('input', function (ev) { if (this.value.length > 10) { this.value = this.value.slice(0, 10); } }, false);