Try this script..
I just commented out action you will take after your phone has been validated or not.
function validate (phone) {
var regex = /^\+(?:[0-9] ?){6,14}[0-9]$/;
if (regex.test(phone)) {
// Valid international phone number
} else {
// Invalid international phone number
}
}
I hope this will help you...