</script>
function checkLocal(phoneNo) {
var phoneRE = /^\d{2,4}-\d{6,8}/;
if (phoneNo.match(phoneRE)) {
return true;
} else {
alert("The phone number entered is invalid!");
return false;
}
}
function checkInternational(phoneNo
var phoneRE1 = /^\+31\d{3}-\d{6}/;
var phoneRE2 = /0031\d{2}-\d{7}/;
if (phoneNo.match(phoneRE1)||
return true;
} else {
alert("The phone number entered is invalid!");
return false;
}
}
//checkPhoneNumber("(123) 345-7890");
checkLocal("0599-123456");
checkLocal("050-1234567");
checkLocal("06-12345678");
checkInternational("+31599
checkInternational("003150
</script>
Main Topics
Browse All Topics





by: pizzametsalamiPosted on 2004-03-24 at 02:21:15ID: 10665837
Oh and I would allmost forget:
I would like havin a regexp for validating e-mailaddresses --> any idea's? thnx