Showing results for 
Search instead for 
Did you mean: 

Custom Validation for Nintex Forms

This script allows you to add in-depth custom validation power to your Nintex Form.

AuthorAaron Labiosa
Long Description

This script and approach is fully compatible with the built in Validation system in Nintex Forms however, this validation will occur prior to the form being evaluated by the built in Forms Validation.

//Sets fields in parameter to have a red background.

function showInvalidFields(fields){

for (var i = 0; i < fields.length; i++) {

fields.css('background-color', 'red !important'); }


//Sets fields in parameter to have a white background.

function resetInvalidFields(fields){

for (var i = 0; i < fields.length; i++) {

fields.css('background-color', 'white !important'); }


//Pass Client ID configured in Control to this function.

function validateBlankField(nfclientid){

if(!NWF$('#' + nfclientid).val().match(/./)) return false;

return true;


//Pass label of out of the box 'Save and Submit' button as parameter.

function submitForm(buttonName){

var validated = true;

var invalidFields = [];

var validFields = [];

//Validating the field 'mytextbox'.

if (!validateBlankField(mytextbox)){

validated = false;

invalidFields.push(NWF$('#' + mytextbox));



validFields.push(NWF$('#' + mytextbox));


//If form passes validation, submit.





//If form fails validation, show invalid fields and prompt.




alert('The form is invalid, please correct the highlighted fields, and submit again');



Support Info

Aaron Labiosa​ - Custom Validation for Nintex Forms


Nintex Forms 2010

Nintex Forms 2013

Nintex Forms Office 365


SharePoint Server 2010

SharePoint Server 2013

Office 365


Additional Information

To view an example of this in action visit - Custom Validation for Nintex Forms

Nintex Xchange Terms of Use Policy

Nintex makes no warranty or guarantee about the reliability, performance, quality, or functionality of any assets, and any assets you install are therefore provided as is. By downloading this asset, you agree to the terms of use.

Version history
Revision #:
1 of 1
Last update:
‎05-17-2016 08:14 AM
Updated by: