fix:Future date of birth accepted at Sibling Detail section in Student form #20619
diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py
index d7d35ca..1a870a3 100644
--- a/erpnext/education/doctype/student/student.py
+++ b/erpnext/education/doctype/student/student.py
@@ -23,8 +23,8 @@
def validate_dates(self):
for sibling in self.siblings:
- if sibling.date_of_birth and getdate(sibling.date_of_birth) >= getdate(today()):
- frappe.throw(_("Sibling Date of Birth cannot be greater than today at row #{0} ").format(sibling.idx))
+ if sibling.date_of_birth and getdate(sibling.date_of_birth) >= getdate():
+ frappe.throw(_("Row {0}:Sibling Date of Birth cannot be greater than today").format(sibling.idx))
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
frappe.throw(_("Date of Birth cannot be greater than today."))