Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Format of Single Line of Text field


Need some help with the format of a single line of text field using Nintex form. I need the control to be invalid if the set format is not followed. It should be in the following format (########-##-##-####). 

I was able to accomplish this in the column validation settings using the following formula: where "text" is the single line of text column:


However this is not allowing me to set the error message as I want when filling the form. It is throwing a generic error of something went wrong, please try again.

Any help or information is much appreciated. 



Labels: (1)
0 Kudos
2 Replies
Automation Master
Automation Master

Re: Format of Single Line of Text field

you could use regular expression validation with following pattern


Nintex Employee
Nintex Employee

Re: Format of Single Line of Text field

Hi Ronnie,

Great question. 

Regex validation is going to be the right choice, just like Marian Hatala‌ mentioned. 

I used the following: (\w{8}|\d{8})[-](\w{2}|\d{2})[-](\w{2}|\d{2})[-](\w{4}|\d{4})

However, I also used an external JS library called Cleave.js to format the input box for me: Cleave.js - Format input text content when you are typing 

Using the following JS, I was able to enforce the formatting of the Single line text box: 

NWF$(document).ready(function () {
var cleave = new Cleave('.input-element', {
delimiter: '-',
blocks: [8, 2, 2, 4],
numeric: true