Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2016 04:37 AM
Need validation for (xxx) xxx-xxx phone number format. Tried regex /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/ but it's accepting other formats as well
Solved! Go to Solution.
Labels:
- Labels:
-
Scripting and Coding
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2016 04:46 AM
Could you please try this regexp -
/^\([0-9]{3}(\)) [0-9]{3}-[0-9]{4}$/;
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2016 04:46 AM
Could you please try this regexp -
/^\([0-9]{3}(\)) [0-9]{3}-[0-9]{4}$/;