Skip to main content
Question

Docusign API : how to change the validation message for Numerical Tab?

  • 18 July 2024
  • 2 replies
  • 32 views

In the numerical tab I want to change the validation message. Currently, if I enter invalid number it says – Invalid number, sample format #,###.##. I want to change it and not show # symbols. How to do it using Docusign Java API?

 

 

2 replies

Userlevel 1
Badge +3

Hello,

Thank you for posting to DocuSign's Community.

I share the following documentation where it explains in detail the use of numerical tabs and what you can and cannot do with them.

https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/number-fields/#set-the-numericaltab-number-display-format

 

Regards,

Eric | Docusign

Userlevel 2
Badge +7

please reference this document:

https://www.docusign.com/blog/developers/common-api-tasks-use-regex-validation-envelopes-tabs

 

// Create a Signer object
Signer signer1 = new Signer();
signer1.setEmail("inbar.gazit@docusign.com");
signer1.setName("Inbar Gazit");
signer1.setRecipientId("1");

// Create a Text Tab
Text textTab = new Text();
textTab.setDocumentId("1");
textTab.setPageNumber("1");
textTab.setXPosition("500");
textTab.setYPosition("200");
textTab.setWidth("100");
textTab.setValidationMessage("US Zip Code must be in the format ##### or #####-####.");
textTab.setValidationPattern("^[0-9]{5}(-[0-9]{4})?$");

// Tabs are set per recipient / signer
Tabs signer1Tabs = new Tabs();
signer1Tabs.setTextTabs(Arrays.asList(textTab));
signer1.setTabs(signer1Tabs);

// Add the recipient to the envelope object
Recipients recipients = new Recipients();
recipients.setSigners(Arrays.asList(signer1));
envelopeDefinition.setRecipients(recipients);
 

Reply