2021-07-16 13:09:58 +02:00
|
|
|
from flask_wtf import FlaskForm
|
|
|
|
from wtforms import StringField, PasswordField, SubmitField
|
|
|
|
from wtforms.validators import DataRequired, Length, EqualTo
|
|
|
|
|
|
|
|
|
|
|
|
class RegistrationForm(FlaskForm):
|
2022-04-16 15:48:20 +02:00
|
|
|
# clarify that it conforms with casemapping on ircd.
|
2021-07-16 13:09:58 +02:00
|
|
|
username = StringField('Username', validators=[DataRequired(), Length(min=1, max=32)])
|
|
|
|
password = PasswordField('Password', validators=[DataRequired()])
|
|
|
|
confirm_password = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')])
|
|
|
|
submit = SubmitField('Register')
|