from flask.ext.wtf import Form
from wtforms import StringField, BooleanField, PasswordField
from wtforms.validators import InputRequired, Email, EqualTo, Length

class LoginForm(Form):
    nickname = StringField('nickname', validators=[InputRequired()])
    password = PasswordField('password', validators=[InputRequired()])
    remember_me = BooleanField('remember_me', default=False)

class RegisterForm(Form):
    nickname = StringField('nickname', validators=[InputRequired()])
    email = StringField('email', validators=[InputRequired(), Email()])
    password = PasswordField('password', validators=[InputRequired(), 
                                                     EqualTo('confirm', message='Password must match')])
    confirm = PasswordField('confirm password')

class NewPostForm(Form):
    body = StringField('body', validators=[InputRequired(), Length(max=140)])
[((8, 18, 8, 60), 'wtforms.BooleanField', 'BooleanField', (), '', False, 'from wtforms import StringField, BooleanField, PasswordField\n'), ((15, 14, 15, 47), 'wtforms.PasswordField', 'PasswordField', ({(15, 28, 15, 46): '"""confirm password"""'}, {}), "('confirm password')", False, 'from wtforms import StringField, BooleanField, PasswordField\n'), ((6, 51, 6, 66), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((7, 53, 7, 68), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((11, 51, 11, 66), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((12, 45, 12, 60), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((12, 62, 12, 69), 'wtforms.validators.Email', 'Email', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((13, 53, 13, 68), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((14, 53, 14, 102), 'wtforms.validators.EqualTo', 'EqualTo', (), '', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((18, 43, 18, 58), 'wtforms.validators.InputRequired', 'InputRequired', ({}, {}), '()', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), ((18, 60, 18, 75), 'wtforms.validators.Length', 'Length', (), '', False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n')]