Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function telephoneCheck(str) {
- // Good luck!
- if(/^[1]*(\s)*([0-9]{3}|\([0-9]{3}\))(\s)*(-)*[0-9]{3}(\s)*(-)*[0-9]{4}/.test(str) && !/^(\([0 2-9]{3}\)[0-9]{8}|[0 2-9]{11})/.test(str))
- return true;
- else
- return false;
- }
Add Comment
Please, Sign In to add comment