SAI YEWALE

Generation

typingsThu, 15 Dec 2022

regular expression for mobile no. length must be 10 in js

var phoneno = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/; if(inputtxt.value.match(phoneno)) { return true; } else { alert("message"); return false; }

Questions about programming?Chat with your personal AI assistant