How To Restrict Numeric Data Entered to a Certain Number of Digits in a Nintex Workflow Cloud Form (NWC)

You can easily configure a form field to only accept a certain number of digits as input. This configuration also will not allow text or special characters to be entered in the form field. This post will show you how configure this in a Nintex Workflow Cloud form. This solution can be useful to validate data like Account Numbers, Employee IDs, Invoice Numbers, and many other examples.

Follow these steps to build out this functionality:

  1. Add a Text – Short control to the form.
  2. Select “Regular expression” in the Input Validation setting drop-down menu.
  3. Enter the desired regular expression string in the Pattern field. Below are examples:
Restrict Number of Digits Entered to:Pattern:
5 digit number^(\d{5})$
7 or 8 digit number^(\d{7}|\d{8})$
9, 10, or 12 digit number^(\d{9}|\d{10}|\d{12})$
  1. Feel free to enter a message in the “Custom Regular expression message” field.
    1. This message displays if the data entered is not the correct number of digits.
    2. You can use this message as an instruction to the form user to correct the data.
  2. Test out this functionality by going to the Preview tab and adding data to the form field you configured.
    1. If you enter fewer or more digits than the pattern, the field is marked as invalid and the “Custom Regular expression message” appears under the field.
    2. If you enter text or special characters, the field will also be marked as invalid and the “Custom Regular expression message” appears under the field.
NWC Form Restrict Data Entered to Certain Number of Digits

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by

Up ↑

%d bloggers like this: