How can we help?
< All Topics
Print

Regex Validation for custom length digits

Here is how you can validate 5, 6, 7, 8, 9, 10, n… digits as per your requirement using Regex validation.

  1. Edit the block where you want this validation.
  2. Select input type as Text Input
  3. Select ‘Regex’ from the User Input Validation drop down.
  1. Enter your custom Regex validation and the validation message as shown in below image.
  1. Save the block!

Bonus: Here is the Regex validation text for verifying if the user has entered ‘N’ length of digits.

  • Validate if there is 1 Digit in the text – ^[0-9]{1}$
  • Validate if there are 2 Digits in the text – ^[0-9]{2}$
  • Validate if there are 3 Digits in the text – ^[0-9]{3}$
  • Validate if there are 4 Digits in the text – ^[0-9]{4}$
  • Validate if there are 5 Digits in the text – ^[0-9]{5}$
  • Validate if there are 6 Digits in the text – ^[0-9]{6}$
  • Validate if there are 7 Digits in the text – ^[0-9]{7}$
  • Validate if there are 8 Digits in the text – ^[0-9]{8}$
  • and so on…

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Previous How to set delivery charges based on distance?
Next How to make the bot remember customer details from their last visit?
Table of Contents