How to implement Validations in Nintex forms for Office 365 in SharePoint Online (4 Examples)

In this article, I am going to explain, how to implement validations in the Nintex forms for Office 365 SharePoint Online. We will see here below validation examples:

  • Nintex forms validation for allowing only digits in the Number field
  • Enter only letters in the textbox field in Nintex forms for Office 365
  • E-mail validation in Nintex forms for Office 365 SharePoint Online

Here I have a SharePoint Online list form customized using Nintex forms for Office 365. Here I have few textbox controls and I want to implement validations into those controls in Nintex.

nintex form validation
Validation in nintex form

Nintex form validation examples: mandatory field validation

Here first I will show how to validate mandatory field validation in Nintex forms for Office 365.

Open your SharePoint Online list using Nintex forms for Office 365 and then Go to Textbox control (First name) and click on it and go to the Control tab on the Ribbon bar, click on “Add Rule” control as shown below.  

Nintex form validation examples
Validation in nintex form

Now, It will be added int right side of the form and click on the “Add” button as shown below.

Validation in nintex form
Validation in nintex form

Next, Enter the “Title” and select “Rule Type” as  “Validation” from the Dropdown list as shown below.

Numerical and Alpha Field Validation nintex form
Numerical and Alpha Field Validation nintex form

Next, go to condition and click on formula builder f(x) button, it will open formula builder window.

Nintex form validation examples
Nintex form validation examples

In “Formula Builder” window, Double click on  “isNullOrEmpty” from the Runtime Functions list. it will be added in the Formula section as shown below.

Numerical and Alpha Field Validation nintex form
Numerical and Alpha Field Validation nintex form

Next, Double click on {self} or Title(related to your List column name) from the “Named Control“. it will added in the function as shown below like ” isNullOrEmpty({Self}) ” or  ” isNullOrEmpty(Title)

Validation in nintex form
Validation in nintex form

Nintex form validation examples: Regular Expression Validation to allow only letters into textbox control in Nintex forms

Right-click on “Textbox” control, then click on “Settings“. it will open “Control Settings – Single Line Textbox”.

Go to the Validation section, here select “Use a regular expression” as “Yes”, enter the Regular expression and Regular expression error message as shown below.

For enter only letters in textbox control add Regular Expression like “[a-zA-Z]+ ” .

Numerical and Alpha Field Validation nintex form
Numerical and Alpha Field Validation nintex form

Nintex form validation examples: Phone Number Validation in Nintex forms for Office 365

Add Rule Validation: Open the list form using the Nintex form for Office 365 designer and follow the same steps as we discussed above for the validation. Add Condition like ” isNullOrEmpty({Self}) ” or ” isNullOrEmpty(PhoneNumber) ” in Nintex forms in SharePoint Online.

Regular Expression Validation: Open the SharePoint list form using the Nintex form for Office 365 designer and follow the same steps as we discussed above for the validation.

For enter only digits in textbox control add Regular Expression like ”
\d{10,10}$ ” .

Numerical and Alpha Field Validation nintex form
Numerical and Alpha Field Validation nintex form

Nintex form validation examples: E-mail Validation in Nintex forms for Office 365

Add Rule Validation: Open the list form using Nintex form for Office 365 designer and follow the same steps as we discussed above for the validation. Add Condition like   ” isNullOrEmpty({Self}) ” or ”
isNullOrEmpty(E-mail) “.

Regular Expression Validation: Open the list form using the Nintex form for Office 365 designer and follow the same steps as we discussed above for the validation. 

For E-mail validation add Regular Expression like:

(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[a-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
Numerical and Alpha Field Validation Nintex form
Numerical and Alpha Field Validation Nintex form

After Save and Publish the form go to your list and click “new item” and click on the save button without enter details, errors will be shown for all the fields as shown below.

nintex form validation
nintex form validation

Check the fields one by one name and Phone Number and E-mail fields. you will get an error message when you enter numbers in “Name field” and when you enter Text in the “Number field” and When you wrongly enter an email address(Enter small letters only else you will get an error) in the “E-mail field“. Follow the below screenshot.

Numerical and Alpha Field Validation nintex form
Numerical and Alpha Field Validation nintex form

You may like Nintex forms for Office 365 tutorials:

Conclusion

In Nintex forms for Office 365 SharePoint Online, it is very easy to add validations into Nintex forms controls without using any code. Here I have shown how to implement mandatory field validation, email validation and numeric field validation in Nintex forms for Office 365 SharePoint Online. 

It will support script languages like javascript, jquery etc. In our next tutorial, we will see Nintex forms validation examples in SharePoint Online Office 365.

>