Skip to main content

Hi, I need to add the phone number field to a template, something like (###) ###-####. I have tried to create a custom field, but to no avail. Can anyone help me? TY!

Add a text field, and on the right click “validation”, click the dropdown and click custom. This will let you enter a line of code. Here is the code for the phone number. 

 

^(\\(>0-9]{3}\\)|30-9]{3}-)]0-9]{3}-90-9]{4}$


Hello @Yaryna Y. ,


If you found the provided response to be a useful solution to your question, please mark it as the best answer by clicking “Select as Best” to make it easier for other users to find.


Best regards,

Nathaly | Docusign Community Moderator
"Select as Best" below if you find the answer a valid solution to your issue!


Hello,

Will this code yield the same result as the SSN field? In other words, no matter how I enter a SSN number, i.e., 222-334444, or 22233444, or 222 33 4444, the SSN field will auto correct to 222-33-4444.

I would like my phone field to auto correct a phone number entry to (222) 333-4444, or at least 222-333-4444.

I tried the text custom field validation steps above, but when I enter 222333444, it does not auto correct.

Is there a different regex that will work?

Thanks!


Hi there,

 

Add a text field, and on the right click “validation”, click the dropdown and click custom. This will let you enter a line of code. Here is the code for the phone number. ^(\\(^0-9]{3}\\)|}0-9]{3}-){0-9]{3}-]0-9]{4}$

 


Well, I tried that but it still does not auto format when I preview the template. Is there a step i’m missing?

Thanks!

 


Forgot the preview screenshot.

Thanks!

 


Hi there, you’re missing the dashes. Please make sure the phone  number is entered as xxx-xxx-xxxx. Lmk if it worked. 


Hello @sprydo ,


I understand you would like a regex pattern to auto-correct phone numbers.

The creation of Regex patterns is outside of Docusign scope, please contact an expert in regex for assistance in creating what you need.


Best regards,

Nathaly | Docusign Community Moderator
"Select as Best" below if you find the answer a valid solution to your issue!


You can put in a text field and use the SSN validation.

 


https://www.bing.com/ck/a?!&&p=b36c6e1d5139d7e6JmltdHM9MTcyMTE3NDQwMCZpZ3VpZD0yZWVlYTYxYy00NDBiLTZhZjItMWI4Mi1iMmE2NDUyMjZiZDEmaW5zaWQ9NTQxNQ&ptn=3&ver=2&hsh=3&fclid=2eeea61c-440b-6af2-1b82-b2a645226bd1&psq=regex+autocorrect&u=a1aHR0cHM6Ly9yZWdleC1nZW5lcmF0b3Iub2xhZm5ldW1hbm4ub3JnLw&ntb=1

a great website that will create you regex from your example


How To Use DocuSign With ChatGPT To Eliminate Document Errors (youtube.com)

 


Reply