How to write JavaScript code to validate mobile number?
Validate a Phone Number Using a JavaScript Regex and HTML
function validatePhoneNumber(input_str) var re = /^\(?(\d3)\)?[- ]?(\d3)[- ]?(\d4)$/; return re. test(input_str); function validateForm(event) var phone = document. getElementById('myform_phone'). value; if (!