import email
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import Email, InputRequired, Length


''' A form to register a new user. '''
class RegisterForm(FlaskForm):
    username = StringField('Enter <NAME>', validators=[InputRequired(), Length(min=4, max=15)])
    password = PasswordField('Enter <PASSWORD>', validators=[InputRequired(), Length(min=4, max=15)])
    email = StringField('email', validators=[InputRequired(), Email(message='Invalid Email'), Length(min=6, max=50)])

'''A form to login a user. '''
class LoginForm(FlaskForm):
    username = StringField('Enter Your Name', validators=[InputRequired()])
    password = PasswordField('<PASSWORD>', validators=[InputRequired()])
    remember = BooleanField('Remember Me')

''' A form to reset a user's password. '''
class ResetPasswordForm(FlaskForm):
    username = StringField('Enter Your Name', validators=[InputRequired()])
    password = PasswordField('Password', validators=[InputRequired()])
    confirm_password = PasswordField('<PASSWORD>', validators=[InputRequired()])

import email
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField
from wtforms.validators import Email, InputRequired, Length


''' A form to register a new user. '''
class RegisterForm(FlaskForm):
    username = StringField('Enter <NAME>', validators=[InputRequired(), Length(min=4, max=15)])
    password = PasswordField('Enter <PASSWORD>', validators=[InputRequired(), Length(min=4, max=15)])
    email = StringField('email', validators=[InputRequired(), Email(message='Invalid Email'), Length(min=6, max=50)])

'''A form to login a user. '''
class LoginForm(FlaskForm):
    username = StringField('Enter Your Name', validators=[InputRequired()])
    password = PasswordField('<PASSWORD>', validators=[InputRequired()])
    remember = BooleanField('Remember Me')

''' A form to reset a user's password. '''
class ResetPasswordForm(FlaskForm):
    username = StringField('Enter Your Name', validators=[InputRequired()])
    password = PasswordField('Password', validators=[InputRequired()])
    confirm_password = PasswordField('<PASSWORD>', validators=[InputRequired()])

A form to register a new user. A form to login a user. A form to reset a user's password.