hi,,i have a form on which user is to enter his/her email,,,i want to add the restricvtion so that user can not enter and save incorrect email,,,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi,
There is a free module for validating the email in Odoo store, the module is of v10. See: Validate E-mail ID
Either you can use the module as such or refer the code and see how it is done. From the index file of the above module, you can see the python packages used for the module, you can try directly using those python packages also.
Python Packages: validate_email and pyDNS
Thanks
Try regular expression in email field like:
regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$'V
else raise Validation Error in py
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up