The “Mandatory Depends On” is client-side only and is bypassed in List View bulk edit. Fix it by adding server-side validation in your DocType’s Python controller:
def validate(self):
If self.result == “Error” and not self.note:
frappe.throw(“Note is mandatory when Result is Error.”)
This enforces the rule everywhere — form view, list edit, API, etc.
as I never worked since now with server-side, can I put this code in a Server Script (from Frappe UI) or I need to manually put in the .py file of the doctype?