You are viewing limited content. For full access, please sign in.

Question

Question

Phone Number Field Constraint

asked on November 21, 2014

I am looking to add a field constraint to a text field that will create a 'mask' for the users to input their phone number in the following format (###) ### - ####.  There is a constraint that 'masks' the numbers like ###-###-#### but my database format includes the parentheses.  I've tried adding this via regular expression, but I am having no luck.  Any idea how to get the parentheses in there?  

 

-Nate

0 0

Answer

SELECTED ANSWER
replied on November 21, 2014

Nathan,

You probably just needed to escape out the parentheses by adding a \. Something like \(\d{3}\)\d{3}-\d{4} should work.

 

 

2 0
replied on November 21, 2014

That did it!  Thanks John

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.