Skip to main content
Nintex Community Menu Bar

I have a field on my nintex form called container number. How do I create a validation rule for the filed to say Container Number Field must begin with OA-

 

So a user is forced to always enter OA-12345

 

All I see in the rules is “contains” which means the OA can be placed anywhere. I need it to always be OA- first.

 

 

Hi @partykdj 

Which form designer are you using - Classic, Responsive or New Responsive?

 

For New Responsive Form, why don’t you use the Input Validation settings (instead of Rules) ?

If you wanted users to enter “AG-12345” where the first 3 characters are “AG-” and the rest is up to the user. Use Regular Expression with the following pattern

 

Output for non-compliant

Output for compliant

 

Hope that helps
PS Sorry! Should be “OG instead of “AG


Which version of the Nintex Forms designer (New Responsive, Responsive, Classic) are you using?

 

If you are using the New Responsive designer, you can create a Submit Rule to accomplish this. Below are the steps:

1. Open the Rules tab in the form.

2, Add and configure a Submit rule.

  • Click the “Add submit rule” button.
  • Name = Validate Container Number (or name it what you like)
  • Click on the Insert (+) button on the first If statement.
  • Configure a Formula using the startsWith function like below and click Insert:
    startsWith(sForm].FContainer Number],"OA-")
  • Select “Is No” condition.
  • Configure the Then sttement as:
    Container Number “Show validation error” “Please enter a Container Number that starts with "OA-" ”
  • Click the “Create rule” button to save and activate the rule.

3. Go to the Preview tab and test the Submit Rule.

 

 


Exactly what I needed! Many thanks…..


Reply