WTForms:安装“ email_validator”以获得电子邮件验证支持
运行以下代码进行表单验证时获取异常。 File "/Users/homeduvvuri/Documents/Learning/PartyGoUdemy/PartGo/user/forms.py", line 11, in BaseUserForm email = EmailField('Email', [validators.DataRequired(), validators.Email()]) File "/Users/homeduvvuri/Documents/Learning/PartyGoUdemy/PartGo/partgo-env/lib/python3.7/site-packages/wtforms/validators.py", line 332, in __init__ raise Exception("Install 'email_validator' for email validation support.") Exception: Install 'email_validator' for email validation support. 在codeanywhere VM上完美运行。不在本地计算机上。 from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed from wtforms import Form, StringField, PasswordField, validators, …