From 67e2127a5d9de5c17af122cb5fcacfc05e980a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Petit?= Date: Tue, 8 Mar 2016 10:05:20 +0100 Subject: [PATCH] Update deprecated references validators.Required() is marked as deprecated in favor of validators.DataRequired() and will be remove in WTForms 3. --- docs/patterns/wtforms.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/patterns/wtforms.rst b/docs/patterns/wtforms.rst index 88602b6c..5a84fce8 100644 --- a/docs/patterns/wtforms.rst +++ b/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)]) email = StringField('Email Address', [validators.Length(min=6, max=35)]) password = PasswordField('New Password', [ - validators.Required(), + validators.DataRequired(), validators.EqualTo('confirm', message='Passwords must match') ]) 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 -----------