I have created a webform i when write code for validation in corresponding python file i get error in chromes console window why is that
def validate(self):
validate_duplicate_contact_person(self.contact_details)
validate_email()
http://localhost:8003/ 417 (EXPECTATION FAILED)
frappe-web.min.js:1573 Traceback (most recent call last):
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/handler.py”, line 40, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/init.py”, line 898, in call
return fn(*args, **newargs)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/website/doctype/web_form/web_form.py”, line 405, in accept
doc.insert(ignore_permissions = True)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 189, in insert
self.run_before_save_methods()
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in run_before_save_methods
self.run_method(“validate”)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 651, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 858, in composer
return composed(self, method, *args, **kwargs)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 841, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/model/document.py”, line 645, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/shahid/meeting/frappe-bench/apps/erpnext/erpnext/schools/doctype/corporate_registration/corporate_registration.py”, line 13, in validate
validate_email()
File “/home/shahid/meeting/frappe-bench/apps/erpnext/erpnext/schools/doctype/corporate_registration/corporate_registration.py”, line 27, in validate_email
frappe.throw(_(“error”))
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/init.py”, line 310, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/init.py”, line 303, in msgprint
_raise_exception()
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/init.py”, line 276, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: error