function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hrishikesh MoreHrishikesh More 

What is the validation rule for birthdate not less than 18 years ??

Sai PraveenSai Praveen (Salesforce Developers) 
hi Hrihikesh,

Can you confirm if error should be displayed if the age is less than 18 years (Age will get calculated based on Date of Birth).

Thanks,
 
Hrishikesh MoreHrishikesh More
Yes
Shams TabrezShams Tabrez
Hi Hrishikesh,

Use the below formula:
Today() - DOB__c < 6574

If the solution is helpful, please mark it as the best answer.

Thanks & Regards,
Shams Tabrez
 
Anupama Sena ReddyAnupama Sena Reddy
Hi Hrishikesh,

Please try below condition formula:

OR(
ISBLANK(Student_DOB__c ),
NOT(TODAY() - Student_DOB__c < 18)
)

If the solution is helpful, please mark it as the best answer.

Thanks,
Anupama