Skip to main content

We are currently running Nintex Forms 2016 on the most current release and have notice that when we try to add validation to controls on the form through rules non of them work.  Is something broken with validation rules? Formatting with the same rules below works just not validation.

Have done multiple of these:

Textbox Contrl: isNullorEmpty({Self}) , {Self} == ""

Yes/No Control: isNullorEmpty({Self}) , {Self} == "", {Self} == "true", {Self} == "false", equals({Self}, "true"), equals({Self}, "false")

Choice Control: isNullorEmpty({Self}) , {Self} == "", {Self} == "<One of our Options>", equals({Self}, "<one of our options>") 

Would love to have some insight into this as we have many things we want to do validation to with out having to do it through JavaScript.

Your Rules look alright in some cases.

For a Text Box (Multi-line Text Box) the rule: 

isNullOrEmpty({Control:Self})

should work just fine to check whether or not it is empty. 

However, for a Yes/No control, it returns a boolean value, meaning that you could just do something like 

!{Control:Self}

to invalidate the control if it were unchecked.. though that would seem problematic to attach a rule of that nature solely to that control. 

To check if a selection has been made in a Choice control, you could use the rule that works with the Text Box as shown above, which should invalidate the control if left without a selection. 

However, sometimes there are other failures in javascript that might be affecting your rules. Using the guide below you can check to see if you are running into JS errors in other spots on your form. If you are, it could be useful to post the information here. 

------------------------

When you say 'Nintex Forms 2016' I assume that you mean Nintex Forms for SharePoint 2016. If that's the case, You can use Google Chrome while Editing the Form.

Before you launch a test Preview of your form, Press F12 (or Ctrl + Shift + i) to open the Developer's Console. 


210400_pastedImage_1.png

From there, Click first on the Console tab (1) and then clear the console pressing the Clear Console Button (2). 

Finally, Launch your Preview Form as you normally would, and see if any errors occur and are listed inside of the Console. They will be highlighted in Red. Either take a nice screenshot of those, or Copy / Paste the errors directly here. 


‌ Thanks a lot for your help, looking at the error message that was getting there was a custom validation set on a field that was causing the issues. Once I disabled that the validation started working as planned.


Reply