Skip to main content
Nintex Community Menu Bar
Question

Integer regex

  • Nov 22, 2023 8:27 AM UTC
  • 5 replies
  • 211 views
  • Translate All

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
  • Nov 22, 2023 8:53 AM UTC

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 

   

 

 

Translate

Forum|alt.badge.img+5
  • Author
  • Rookie
  • Nov 22, 2023 8:58 AM UTC

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

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Nov 22, 2023 9:09 AM UTC

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)$

 

Translate

Forum|alt.badge.img+5
  • Author
  • Rookie
  • Nov 22, 2023 9:12 AM UTC

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

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Nov 22, 2023 9:16 AM UTC

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

Translate