class MergeAccountForm(Form): merged_username = TextField("Duplicate User's Email Address", [ validators.Required(message=u'Email address is required'), validators.Length(min=6, message=u'Email address is too short'), validators.Length(max=120, message=u'Email address is too long'), validators.Email(message=u'Email address is invalid'), NoHtmlCharacters(), EmailExists(), ], filters=[lowerstripped], widget=BootstrapTextInput()) merged_password = PasswordField( "Duplicate User's Password", [validators.Required(message=u"Please enter the user's password")], filters=[stripped], widget=BootstrapPasswordInput()) user_password = PasswordField("This Account's Password", [ validators.Required( message=u"Please enter the password for this account") ], filters=[stripped], widget=BootstrapPasswordInput())
# The order fields are defined determines their order on the page. name_field = TextField( 'Full Name', [ validators.Required(message=u'Full name is required'), NoHtmlCharacters(), ], filters=[stripped], widget=BootstrapTextInput(), ) email_field = TextField('Email Address', [ validators.Required(message=u'Email address is required'), validators.Length(min=6, message=u'Email address is too short'), validators.Length(max=120, message=u'Email address is too long'), validators.Email(message=u'Email address is invalid'), NoHtmlCharacters(), ], filters=[lowerstripped], widget=BootstrapTextInput()) unique_email_field = TextField('Email Address', [ validators.Required(message=u'Email address is required'), validators.Length(min=6, message=u'Email address is too short'), validators.Length(max=120, message=u'Email address is too long'), validators.Email(message=u'Email address is invalid'), NoHtmlCharacters(), UniqueEmail(), ], filters=[lowerstripped], widget=BootstrapTextInput())