Browse Source

Update deprecated references

validators.Required() is marked as deprecated in favor of validators.DataRequired() and will be remove in WTForms 3.
pull/1748/head
Gaëtan Petit 9 years ago
parent
commit
67e2127a5d
  1. 4
      docs/patterns/wtforms.rst

4
docs/patterns/wtforms.rst

@ -32,11 +32,11 @@ This is an example form for a typical registration page::
username = StringField('Username', [validators.Length(min=4, max=25)]) username = StringField('Username', [validators.Length(min=4, max=25)])
email = StringField('Email Address', [validators.Length(min=6, max=35)]) email = StringField('Email Address', [validators.Length(min=6, max=35)])
password = PasswordField('New Password', [ password = PasswordField('New Password', [
validators.Required(), validators.DataRequired(),
validators.EqualTo('confirm', message='Passwords must match') validators.EqualTo('confirm', message='Passwords must match')
]) ])
confirm = PasswordField('Repeat Password') confirm = PasswordField('Repeat Password')
accept_tos = BooleanField('I accept the TOS', [validators.Required()]) accept_tos = BooleanField('I accept the TOS', [validators.DataRequired()])
In the View In the View
----------- -----------

Loading…
Cancel
Save