#!flask/bin/python

from flask.ext.wtf import Form
from wtforms import TextField, PasswordField, BooleanField
from wtforms.validators import DataRequired, Length, EqualTo

class RegistrationForm(Form):
    name = TextField('name', validators = [Length(min=2, max=50)])
    email = TextField('email', validators = [Length(min=6, max=50)])
    password = PasswordField('password',
                             validators = [
                                 DataRequired(),
                                 Length(min=6, max=25),
                                 EqualTo('confirm', message='Passwords must match')
                             ] )
    confirm = PasswordField('confirm password')
    accept_tos = BooleanField('accept terms and conditions', default = False)

class LoginForm(Form):
    email = TextField('email', validators = [DataRequired()])
    password = PasswordField('password', validators = [DataRequired()] )
    remember_me = BooleanField('remember_me', default = False)
