Browse Source

description length validated

master
venkataakhil 1 year ago
parent
commit
c595d5dddb
  1. 6
      smart_service/add_ons/doctype/circular/circular.py

6
smart_service/add_ons/doctype/circular/circular.py

@ -1,8 +1,10 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
import frappe
from frappe.model.document import Document
class Circular(Document):
pass
def validate(self):
if self.description and len(self.description)>850:
frappe.throw("Description should be less than or equal to 850 characters ")
Loading…
Cancel
Save