Solved

Input Validation Pattern To Match Symbols

  • 8 February 2022
  • 2 replies
  • 102 views

Badge +3

I've never understood why Nintex Forms use the reverse of the logical JavaScript pattern to match strings for input validation, but I've usually been able to figure out how to match what I want.  This time, I'm stuck.

 

I've got a New Responsive Designer form in O365.  I want to invalidate any input of a non-word character in a text field.  With this pattern...

 

21769i9E1BF09ACDD2E2C2.png

 

It matches if I only input symbols.

 

21771i306E945B485864DE.png

As soon as I add a letter or number, the match fails.

 

21772iA5451E01144A0D8E.png

Anyone know the pattern to make this work?

icon

Best answer by andyCOT 10 February 2022, 17:15

View original

2 replies

Badge +3

Since I consider this feature broken, I submitted a ticket to Nintex.


 


The correct pattern to match a symbol or symbols, anywhere in the string in a text box, is:


^[ws]*$


 


For the record, I tried it in two RegExp testing sites, one for .NET and another for JavaScript, and it works in neither.  This pattern should match only word characters or spaces at the beginning of the string.


 


¯_(ツ)_/¯


 

Badge +3

From Nintex Support:  "The input validation needs to have a regular expression that tells the control what is valid."


 

Reply