Skip to main content
Nintex Community Menu Bar

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

  • April 2, 2019
  • 2 replies
  • 19 views

Forum|alt.badge.img+2

 

 

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-u065Fu066A-u06EFu06FA-u06FFa-zA-Zs.]+[u0600-u065Fu066A-u06EFu06FA-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 :(

 

 

2 replies

Forum|alt.badge.img+10
  • April 3, 2019

Try this in the rules validation for the contorl

 


Forum|alt.badge.img+14
  • Scholar
  • April 5, 2019

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.