Advertisement
Guest User

Untitled

a guest
Mar 16th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from wtforms import Form, BooleanField, TextField, PasswordField, validators
  2.  
  3.  
  4. class RegistrationForm(Form):
  5. username = TextField('Username', [validators.Length(min=4, max=25)])
  6. email = TextField('Email Address', [validators.Length(min=6, max=35)])
  7. password = PasswordField('New Password', [
  8. validators.Required(),
  9. validators.EqualTo('confirm', message='Passwords must match')
  10. ])
  11. confirm = PasswordField('Repeat Password')
  12. accept_tos = BooleanField('I accept the TOS', [validators.Required()])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement