realms-wiki/realms/modules/auth/forms.py
2014-11-17 11:25:26 -06:00

18 lines
629 B
Python

from flask_wtf import Form
from wtforms import StringField, PasswordField, validators
class RegistrationForm(Form):
username = StringField('Username', [validators.Length(min=4, max=25)])
email = StringField('Email Address', [validators.Length(min=6, max=35)])
password = PasswordField('Password', [
validators.DataRequired(),
validators.EqualTo('confirm', message='Passwords must match')
])
confirm = PasswordField('Repeat Password')
class LoginForm(Form):
email = StringField('Email', [validators.DataRequired()])
password = PasswordField('Password', [validators.DataRequired()])