Python wtforms.validators.InputRequired() Examples

The following are 1 code examples of wtforms.validators.InputRequired(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wtforms.validators , or try the search function .
Example #1
Source File: testauth.py    From evesrp with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def form(self):
        class TestLoginForm(Form):
            username = StringField(u'Username', validators=[InputRequired()])
            password = PasswordField(u'Password', validators=[InputRequired()])
            submit = SubmitField(u'Log In using {}'.format(self.name))
        return TestLoginForm