Advertisement
Guest User

Untitled

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