Validation change based on element value

Mono

Member
Not sure of the best way to do this, but I have an element that is validated as required,

driving_licence_no

But if the person is aged >17 I need it to not be required.

Any pointers are much appreciated thanks
 
Not sure of the best way to do this, but I have an element that is validated as required,

driving_licence_no

But if the person is aged >17 I need it to not be required.

Any pointers are much appreciated thanks
Easy, in the validation plugin, I assume you are using the notempty validation but this applies to all of them, you will see a box below called condition. Place your requirements here. For example:

return '{listname_age}' < 18;

This will return true to run the validation if the age is less than 18, or false to not run the validation if the age is 18+;
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top