Could anyone tell me what RegEx would work to validate an international phone number including white space between the numbers and also allowing for these chars: - ( )
- ( )
Try this code
HTML Code
JS Code
$("#phone").blur(function() { var regexp = /^[\s()+-]*([0-9][\s()+-]*){6,20}$/ var no = $("#phone").val(); if (!regexp.test(no) && no.length < 0) { alert("Wrong phone no"); } });