Skip to main content
Question

Regex pattern for a number that cannot be more than 10 digits but will still allow to enter less than 10

  • April 9, 2026
  • 1 reply
  • 9 views

Forum|alt.badge.img+2

Looking to find out if anybody is using a regex patter for the numbers in a text box as a validation to only allow user enter max of 10 numbers but is still able to enter less than 10, without being forced to add zeros in front of it if the number is less than 10 digits. And is still able to complete the envelope. 

Thank you, 

 

1 reply

Forum|alt.badge.img+15
  • Community Moderator
  • April 10, 2026

Hello ​@Blanka Weber,

Thanks for reaching out, and welcome to the Docusign Community!

You can use this regex to allow numbers only, up to 10 digits: ^\d{1,10}$  . This lets users enter fewer than 10 digits, blocks anything over 10, and doesn’t require leading zeros.

Please note that DocuSign Support isn’t responsible for creating or troubleshooting custom RegEx. Any examples shared are provided on a best‑effort basis and should be tested and used at your discretion.

I hope you find this helpful. If you believe this response effectively addresses your question, you can mark it as “Best Answer” to help other users with similar questions and to make it easier to find. Should you require any additional assistance, feel free to reach out. Thank you!

 

Best regards,

Jenny | Docusign Community Moderator

If this helped, like 👍and mark it as “Best Answer”.