Skip to main content
Nintex Community Menu Bar

Form validation that requires 4 characters

  • January 22, 2019
  • 7 replies
  • 28 views

Forum|alt.badge.img+7

Hello

I have a single line text field which has a maximum of 4 characters called 'Ops ID'.  What would a regular expression in a Nintex form validation be that requires all 4 characters to be provided?

ab1f - valid (4 characters)

ab1 - invalid (only 3 characters)

7 replies

Forum|alt.badge.img+14
  • Scholar
  • January 22, 2019

eg.

^[a-zA-Z0-9]{4}$‍

(allows both lower- and upper-case characters and any of their mix. if you only want lower-case ones remove 'A-Z' from the pattern)


Forum|alt.badge.img+7
  • Author
  • January 23, 2019

Works perfect.  Thank you.


Forum|alt.badge.img+3
  • Rookie
  • March 25, 2020

I need for the submittere to enter the year in to a text box. 

 

I tried use the script but I only need 4 number, so I removed "a-zA-Z".  

6931iD42D4D5BDD1F13C5.png

6932i39CD1BF075725511.png

 

I still get an error message.  Need help not sure what I am doing wrong.

 

Thanks


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • March 25, 2020
Hi,

Is there white space before the expression? The expression should work otherwise.
If a regualar expression does not work just use a range validation instead which is the option above the regular expression.

Forum|alt.badge.img+3
  • Rookie
  • March 25, 2020

Thank you Simon it works!! 

 I went back and had to delete the single text box field and crate a new one.  Instead of coping and pasting the expression I typed it in. 

 


Forum|alt.badge.img

Thank you Simon it works perfect! Thank you.

happy wheels


Forum|alt.badge.img

Thanks in advance!

happy wheels