cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

How to validate the textbox in nintex form for not accepting whitespace?

Jump to solution

 

 

Hello everyone,

 

I'm facing a problem with validating the textbox in nintex form to not accepting spaces as a value.

I want the text box accept only Arabic or English characters with spaces in between and I did it using regular expresion :

^(?![\s.]+$)[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z\s.]+[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z-\s._]*$

 

but when the user enters only space it accept it and take it like it's a value. Even when I removed the regular expresion it still accept the spaces. 

 

I need help please I've spend two days for searching about this problem :(

 

 

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Newbie

Re: How to validate the textbox in nintex form for not accepting whitespace?

Jump to solution

Try this in the rules validation for the contorl

 

View solution in original post

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How to validate the textbox in nintex form for not accepting whitespace?

Jump to solution

regular expression validation works so that it first trims the inout from leading and trailing spaces, then checks whether there stil left any input (at least one character) and just if so it applied regular expression validation.

 

so in your case of submitting single (or even multiple) spaces regular expression is not applied at all.

so either you'd need to make the field mandatory and/or check for not being empty along with regular expression validation.

0 Kudos
Reply