Is there a way to validate end user entry so that the 1st and last number upon data entry cannot be a zero?
Here is what the department would like:
XYZ #: 6 numbers max (done), Numbers only (Done), Cannot start or end with 0 (not done)
The field was created in SharePoint 2013 and set at one line text, 6 char max. In Nintex I set the validation for numbers only.
Solved! Go to Solution.
You can use a regular expression for validation:
^([1-9]\d{0,4}[1-9]|\d)$
Thank you for the reply. I am looking at this and I am sure it makes sense but I am confused as to how to apply it to my situation.
Use the following settings for single line text control in Nintex Forms:
When I enter that expression my form crashes:
Here is my screen
You have an extra ) added after 1-9]) <----
^([1-9])\d{0,4}[1-9]|\d)$
^([1-9]\d{0,4}[1-9]|\d)$
Ah Ha! Thx. Will clean up.
Sorry, please change ^([1-9]\d{0,4}[1-9]|\d)$ to ^([1-9]\d{0,4}[1-9]|[1-9])$
This ensures that numbers with only one digit may not have the value 0.
What is a good resource to reference this syntax so I can learn and build upon it?