Hello,
You can use this script to get the user age from date of birth date
After that you can use this python function to fire an alert and clear the field so he can enter a correct one frappe.throw("Your Age is less than 18") frm.set_value("date",)
I mean how can I validate that someone is over 18 from their date of birth using your suggested python code, can u please provide me the full python code, and which path should I put it inside?