how to check the phone number is valid by javascript code example Example: js validate phone number /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im