I am testing web form in V14. What I am testing is pretty simple.
I have a form with 1 check box, and if the box is not checked, it should show error message. Here is the script I have on the Client Script section of the web form.
frappe.web_form.validate = () => {
let data = frappe.web_form.get_values();
if (!data.checked) {
frappe.msgprint('No Checked');
return false;
}
return true;
}
The validation is checked, but the message do not persist on screen. Anything is incorrect here?