Here I have used an info type field to validate the length of a contract id.
But, here I want to give a warning message as below.
Hey @Aruna Dilshan 👋
I see you’ve written into our Support team with this question and I’ll share the solution here:
It wouldn’t be possible to customize the “Enter a valid value” text from your screenshot based on length of the input field for the user to see within the Zap Editor itself. For that purpose, including helpText for that inputField or alternatively an additional Copy type to let the user know about the 5 character limitation are the options.
You can however include field length validation in the perform for this action, so when the user tests that action or runs it live, an error would be returned.
More information about the general error class is outlined here: https://platform.zapier.com/cli_docs/docs#general-errors
You could use an IF statement to check whether the length of a specific field in the bundle.inputData (in this case bundle.inputData.contract_id) is greater than a specific length and return a general error class similar to the following: throw new z.errors.Error('Contract ID must be less than 5 characters.')
throw new z.errors.Error('Contract ID must be less than 5 characters.')
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.