首页 > wtf表单验证不起作用?

wtf表单验证不起作用?

问题1:if Form.validate_on_submit():不起作用,不能正常提交表单,只能用if request.method == 'POST':
问题2:在表单类中新建password2 = PasswordField('password2',validators=[Required()]),没有效果,在html中{{ sys_setup_forms.password2(class="form-control",id="password2",required=True)}}才能正常显示,这个是因为没有用validate_on_submit()引起的吗?
PS:各位大神有比较好的wtf教程吗?例如在html中{{ }},验证语句该怎样写

【热门文章】
【热门文章】