def validate_password_repeat(form, field):
"""
Validates if the repeated password is the same as 'password'
:param form: The form which is being passed in
:type form: CompleteSignupForm
:param field : The data value for the 'password' entered by User
:type field : PasswordField
"""
if field.data != form.password.data:
raise ValidationError('The password needs to match the new '
'password')
评论列表
文章目录