When using Nintex Forms for submissions of surveys, promotions, or orders where a user must meet a certain age, Nintex Forms has you covered with Validation rules. For this example, we are opening a contest for a free bottle of a tasty beverage (which in the United States requires you to be 21 years old).
If a user enters a birth date that is less than 21 years old, they will receive an error message:
To create a validation rule against the Date Picker control, we need to write a rule around the length of one day. To do that, you can use a calculated value control:
“Birthday” in the Formula field is the DatePicker control, named “Birthday”.
When previewing the form you will see that calculations of dates through integers are in milliseconds.
Now that we know the value of a date picker control, we can build a form variable to get the value required (NOTE: ensure data type is Integer):
We can then build a Validation rule as follows to ensure that the Form Variable “birthdayCheck” is greater than 662688000.