You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
747 B
28 lines
747 B
3 years ago
|
"""Reset Password Form form to reset a users PasswordField."""
|
||
|
from wtforms import (
|
||
|
SubmitField,
|
||
|
PasswordField,
|
||
|
)
|
||
|
|
||
|
from wtforms import validators
|
||
|
from wtforms.validators import Length, EqualTo
|
||
|
from flask_wtf import FlaskForm
|
||
|
|
||
|
|
||
|
class ResetPasswordForm(FlaskForm):
|
||
|
"""ResetPassword for distribusi-verse form class"""
|
||
|
|
||
|
password = PasswordField(
|
||
|
"New password:",
|
||
|
validators=[validators.InputRequired(), Length(12, 72)],
|
||
|
)
|
||
|
confirmpassword = PasswordField(
|
||
|
"Confirm your password:",
|
||
|
validators=[
|
||
|
validators.InputRequired(),
|
||
|
Length(12, 72),
|
||
|
EqualTo("password", message="Passwords must match !"),
|
||
|
],
|
||
|
)
|
||
|
submit = SubmitField("Reset your password")
|