Closed baichen99 closed 5 years ago
# tempates/register.html
<form action="{{ url_for("auth.register") }}" method="post">
{{ form.csrf_token }}
<img src="http://via.placeholder.com/100x100/aaa/fff?text=IMG" alt="" class="center-block register-img">
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-equalizer"></span></span>
{{ form.school_id.label(class="sr-only") }}
{{ form.school_id(class="form-control", placeholder="学号") }}
</div>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
{{ form.username.label(class="sr-only") }}
{{ form.username(class="form-control", placeholder="用户名") }}
</div>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-asterisk"></span></span>
{{ form.password.label(class="sr-only") }}
{{ form.password(class="form-control", placeholder="密码") }}
</div>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-asterisk"></span></span>
{{ form.repeat_password.label(class="sr-only") }}
{{ form.repeat_password(class="form-control", placeholder="重复密码") }}
</div>
{{ form.submit(class="btn btn-primary input-sm col-sm-12") }}
</form>
已解决,是EqualTo验证器的参数填写错误
代码如下
debug发现form中_unboundFiled属性为
不知道是不是这个问题