Skip to content
Myr

Update deprecated references

Before adoption: this commit came in with the history the project adopted, so no landing records it.

validators.Required() is marked as deprecated in favor of validators.DataRequired() and will be remove in WTForms 3.

authored by Gaëtan Petit · committed by Gaëtan Petit · parent d45445e · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/patterns/wtforms.rst+2 added-2 removed
30 unmodified lines
31 class RegistrationForm(Form):32 username = StringField('Username', [validators.Length(min=4, max=25)])33 email = StringField('Email Address', [validators.Length(min=6, max=35)])34 password = PasswordField('New Password', [35 validators.Required(),35 validators.DataRequired(),36 validators.EqualTo('confirm', message='Passwords must match')37 ])38 confirm = PasswordField('Repeat Password')39 accept_tos = BooleanField('I accept the TOS', [validators.Required()])39 accept_tos = BooleanField('I accept the TOS', [validators.DataRequired()])4041In the View42-----------43
83 unmodified lines