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, 'wtforms.BooleanField', 'BooleanField', (['"""remember_me"""'], {'default': '(False)'}), False, 'from wtforms import StringField, BooleanField, PasswordField\n'), (15, 'wtforms.PasswordField', 'PasswordField', (['"""confirm password"""'], {}), False, 'from wtforms import StringField, BooleanField, PasswordField\n'), (6, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (7, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (11, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (12, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (12, 'wtforms.validators.Email', 'Email', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (13, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (14, 'wtforms.validators.EqualTo', 'EqualTo', (['"""confirm"""'], {'message': '"""Password must match"""'}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (18, 'wtforms.validators.InputRequired', 'InputRequired', ([], {}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n'), (18, 'wtforms.validators.Length', 'Length', ([], {'max': '(140)'}), False, 'from wtforms.validators import InputRequired, Email, EqualTo, Length\n')]