Skip to main content
Nintex Community Menu Bar
Question

Integer regex

  • November 22, 2023
  • 5 replies
  • 133 views

Forum|alt.badge.img+5

How to add a validation for a text feild to accept only integer numbers only without commas as shown below

1234343

5 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • November 22, 2023

Hi @wejdan 

You can use Regex (Regular Expression) as the validation method

\d*
Means accept 0 or more digits

 

\d{2,6}
Means accept between 2-6 digit 

   

 

 


Forum|alt.badge.img+5
  • Author
  • Rookie
  • November 22, 2023

it is accept string also, How it can be accept only numbers


Garrett
Forum|alt.badge.img+16
  • Scout
  • November 22, 2023

Sorry.

Is this a Text-Short field? And is the field to accept only numerical values or digits?


If Yes,
   Set Validation to Regular Expression

 

   Set the Pattern

Exactly 4 digits eg “1234 ^(\d{4})$
Between 2-8 digits ^(\d{2,8})$
Exactly 3 or 5 digits “123” or 
12345
^(\d{3}|\d{85)$
One more digits ^(\d)$

 


Forum|alt.badge.img+5
  • Author
  • Rookie
  • November 22, 2023

yes text short feild, put all those patterns doesn’t work


Garrett
Forum|alt.badge.img+16
  • Scout
  • November 22, 2023

Can you provide examples of what will be accepted and what should failed?