I wanted to know if its possible to stop a document from being saved and throw a validation message to the user just using Server script without needing to create client script which calls the server script and waits for response.
As this would make the development much easier.
I tried frappe.throw() and frappe.msgprint() but got no luck.