marioneil | Posts: 105

Regex - Validation failed

0 votes
Hi I am using the following regex pattern for validation \^.{0,5}$ Min len 0 , max len is 5, any character The text is optional , hence the min is 0 However I am getting a validation error when , the text area is empty. pacakge id on sandbox is TD1x1jQ93cTl5Gcv74QowvXqnLU= URL is https://sandbox.esignlive.com/ Why am I forced to enter a text , when min len is 0 See the attached screenshots

Attachments
harishaidary | Posts: 1812

Reply to: Regex - Validation failed

0 votes
Hi Mario, If you're only looking to restriction the length of the input, you don't need to use a regex. You can simply use the "minLength" and "maxLength" attributes:
{
          "extract": false,
          "height": 50,
          "left": 100,
          "page": 0,
          "subtype": "TEXTFIELD",
          "top": 200,
          "type": "INPUT",
          "validation": {
            "enum": [],
            "errorCode": 0,
            "maxLength": 5,
            "minLength": 0,
            "required": false
          },
          "width": 200
        }

marioneil | Posts: 105

Reply to: Regex - Validation failed

0 votes
Can you give me some explanation of the following How are they used by eSignlive What are some sample values "enum": [], "errorCode": 0,

harishaidary | Posts: 1812

Reply to: Regex - Validation failed

0 votes
The enum property is used to populate the options when you are using a dropdown list field. As for the errorCode, I've asked our R&D team about it and will get back to you once I get an answer.

harishaidary | Posts: 1812

Reply to: Regex - Validation failed

0 votes
Hi Mario, As per our R&D team, the errorCode property doesn't do anything in particular since the feature was abandoned. It looks likely that it'll be removed in the next version of the SDK.

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off