Hi all ,
so I made a simple validation script. The script runs fine and throws an error message but saves after the validation is failed .am i doing something wrong.
frappe.ui.form.on('Farms', {
refresh(frm) {
if (frm.doc.grow_area_uom > frm.doc.farm_area_uom){
frappe.msgprint(__("Grow Area cannot be greater than Farm area"));
frappe.validated = false;
return false;
}
}});