Skip to main content
Solved

I need to validate a field to be 9 digits (numbers only with no spaces). What's the regex I need to use?


Forum|alt.badge.img

 The field is used to store a code - its not a number ie uses a separator.  So I can't set it to field type Number

Best answer by Community Expert

Hello,

Does this one work^[0-9]+$ ? the system should not allow the recipient to complete the envelope if there is a space or letter in the text field.

Let us know if you need further assistance with this.

Best regards,

Christopher | DocuSign Community Moderator

"Select as Best" below if you find the answer a valid solution to your issue.

View Original
Is this content helpful?

Forum|alt.badge.img

Hello,

Thank you for reaching out here in the DocuSign Community.

Does this /^\\d+$/ pattern works or this one /^[0-9]{0,}$/ ?

Let us know if you need further assistance with this.

Best regards,

Christopher | DocuSign Community Moderator

"Select as Best" below if you find the answer a valid solution to your issue.


Forum|alt.badge.img

Thanks @Christopher Alpizar​ - I tried both and tested on the Preview. Neither worked. Everything I entered wasn't accepted.

eg 123456789 (which should be valid as 9 digits, all numbers with no spaces) but it wouldn't proceed


Forum|alt.badge.img

Hello,

Does this one work^[0-9]+$ ? the system should not allow the recipient to complete the envelope if there is a space or letter in the text field.

Let us know if you need further assistance with this.

Best regards,

Christopher | DocuSign Community Moderator

"Select as Best" below if you find the answer a valid solution to your issue.


Forum|alt.badge.img

Yes - thanks that one's has done the job. (Maybe it was the / at the end of the other two patterns which caused them not to work)


Freddie A
New Voice
Forum|alt.badge.img+1
  • New Voice
  • July 26, 2024

I see this works for 4 Numbers but what If I need them random, this is in order only.