webreg/forms.py
Georg d2e8fcd2b5
Init + SSO registration
Signed-off-by: Georg <georg@lysergic.dev>
2021-09-01 12:55:44 +02:00

17 lines
818 B
Python

from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired, Length, EqualTo, Email
class RegistrationForm(FlaskForm):
username = StringField('Username', validators=[DataRequired(), Length(min=1, max=32)])
email = StringField('Email', validators=[DataRequired(), Email()])
password = PasswordField('Password', validators=[DataRequired()])
confirm_password = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')])
submit = SubmitField('Register')
#class VerificationForm(FlaskForm):
# username = StringField('Username', validators=[DataRequired(), Length(min=1, max=32)])
# verif_code = StringField('Verification Code', validators=[DataRequired()])
# submit = SubmitField('Verify')