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

Form validation that requires 4 characters

Jump to solution

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)

Labels: (1)
0 Kudos
Reply
7 Replies
Highlighted
Automation Master
Automation Master

Re: Form validation that requires 4 characters

Jump to solution

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)

View solution in original post

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Form validation that requires 4 characters

Jump to solution

Works perfect.  Thank you.

Reply
Highlighted
Nintex Newbie

Re: Form validation that requires 4 characters - Only number

Jump to solution

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".  

Control Setting - Single Line Texbox - Validation.png

Control Setting - Single Line Texbox - Validation Error.png

 

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

 

Thanks

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Form validation that requires 4 characters - Only number

Jump to solution
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.
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Form validation that requires 4 characters - Only number

Jump to solution

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. 

 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Form validation that requires 4 characters - Only number

Jump to solution

Thank you Simon it works perfect! Thank you.

happy wheels

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Form validation that requires 4 characters - Only number

Jump to solution

Thanks in advance!

happy wheels

 
 
0 Kudos
Reply