cancel
Showing results for 
Search instead for 
Did you mean: 
Kate-es
Nintex Newbie

How to add a validation for a Number column to accept only integer numbers?

Jump to solution

I have a list with a Number column and created a Responsive Nintex form for this list.

 

I need to add a validation on this column to only accept integer numbers.

 

Here is what I've done:

    Regular expression: ^(\d|,)*\d*$

   Regular expression.PNG 

 

 

But it is not working!

 

Could you please advise? 

Kate

 

Labels: (1)
0 Kudos
Reply
3 Replies
burked
Nintex Newbie

Re: How to add a validation for a Number column to accept only integer numbers?

Jump to solution

Hi @Kate-es

For a simpler approach, it may be easier to just set a validation control from the rules builder. You can add it to the control directly and set it up like below (with 'Integer' being the name of the control):

 

INteger.png

When running the rule it will look like this.

Decimal Added: 

RuleRun.png

This same behavior can be applied in Responsive forms as well.

0 Kudos
Reply
emha
Nintex Newbie

Re: How to add a validation for a Number column to accept only integer numbers?

Jump to solution

it'd helpful if you provided some samples of acceptable and not acceptable inputs. your requirements are not very clear.

 

what's eg. comma in your regex meant for? should it decimal or thousand separator? or is that a just an trial&fail attempt?

should it accept negative intergers?

should it accept or force +/- sign in front of integer?

...

 

 

but for the beginning let's try following pattern. it accepts comma as a thousands separator

 

(?>\-|\+|^)\d{1,3}(,\d{3})*(\.\d+)?$

i.jpg

 

 

 

0 Kudos
Reply
Kate-es
Nintex Newbie

Re: How to add a validation for a Number column to accept only integer numbers?

Jump to solution

Hi Emha,

 

Thanks for your help.

I've found a solution:

RE.PNG

It should not accept negative intergers.

0 Kudos
Reply