Validation of date of birth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 02:30 PM
I want to validate date of birth and set a error message if the date of birth is less than 14 years of age. So if the date of birth is less than 14 years of age then there will be an error message. I have done this from my side but it still not working. I have added the error message but I think there is something wrong with the condition. Need help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 06:36 PM
Hello,
Catalog UI Policy:
Script:
function onCondition() {
g_form.addErrorMessage('Date is less than 14 years ago!');
}
Demo:
Please mark my answer as correct/helpful if it has helped you.
Thanks,
Logan
--
LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 07:18 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2022 03:19 AM
Hi Shubham,
Where are you testing this? Is this on catalog item or on the ritm/task? if you are testing on ritm/task, then seelct the "Applies on target record" chckbox also in your catalog script and check.
Couod you also check if you have placed the error rightlyas the condition looks fine. hope you are using the right field name there.
Mark the comment as a correct answer and helpful if this has helped to solve the problem.