How to implement validation rules by condition in Nintex forms for Office 365 SharePoint Online?

Validation rules in Nintex forms

In this post, we will discuss how we can implement validation rules by the condition in Nintex forms for Office 365 SharePoint online. We can implement validation rules very easily by using various functions, field etc which are available in Nintex forms for Office 365. If you are starting with Nintex forms then you can read: Working with Nintex Forms for Office 365 SharePoint Online.


In this example, I have a drop-down list in SharePoint list form which has two option: Approve and Reject. My requirement is if the user selects the Approve button then there should not be a validation. But if user select Reject option, the user has to put some comment for rejection in a multiline textbox.

Implement Validation Rules by Condition in Nintex Forms for Office 365 SharePoint Online

First Open your SharePoint online site and the go to the particular Sharepoint list. From the list ribbon click on Nintex Forms option which will open Nintex form designer.

Then In the Nintex form designer, Drag and drop a Choice control from Forms Controls toolbox. Then double-click on the Choice box to open Settings dialog box. Here give a name for the choice control. Then select the display format, I want this to appear as a drop down list, so I selected Drop down list option. Then put the values, here I want only two options to Approve and Reject. So add Approve, Reject (separate by comma). The settings will look like below:

nintex forms required field validation
nintex forms required field validation

Then drag and drop a Panel control to the form and double-click on the Panel to open the Control Settings dialog box. Here give a name and Title put some meaningful message which will appear in the panel. It looks like below:

nintex forms mandatory field validation
Validation rules in Nintex forms SharePoint Online

Now drag a multiline textbox inside to the panel. Double click on the Multiline textbox to open settings dialog box. Give a name form the multiline textbox and then Save.

Now it is time to add our rules to the control.

Select the Panel control and then from ribbon click on Add Rule button. Once it will open give a name for the rule and then select Rule Type as Formatting. Then in the Condition box, click on the fx button. Here we will write a rule to show the comment box when the user selects the Reject button.

Here select from Named Controls select the drop-down list name, then from the Operators select the “!=” operator. Then write “Reject”. So the rule should be: choiceApproveReject !=”Reject”. Then in the Formatting option, choose the Hide option. The rule should look like below:

So the rule is like:
txtRejectComments ==”” && choiceApproveReject==”Reject”

And type validation message as “Please enter rejected comment.”

So the rule should look like below:

nintex forms validation rules examples
nintex forms validation rules examples

Now publish the form and then try to create a list item as shown in the fig below: If you select Reject option and then try to submit it will display the error message as shown in the fig below:

nintex forms validation rules examples
nintex forms validation rules examples

You may like following Nintex forms for Office 365 tutorials:



In this tutorial, I have shown you how to implement validation rules by a condition in Nintex forms for Office 365 SharePoint Online. I have explained how we can display a description textbox, once user select Reject from a dropdown list in SharePoint list form.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →