WTForms is a forms validation and rendering library for python web development
and i write this code to check two password is or not same :
from wtforms import Form, BooleanField, TextField, validators
class SignUpForm(Form):
username = TextField('Username', [validators.Length(min=4, max=25)])
email = TextField('Email', [validators.Length(min=6, max=120), validators.Email()])
password1 = PasswordField('Password1')
password2 = PasswordField('Password2')
def sameP(self):
return self.password1 ==self.password2
but , i want to know : can WTForms do this themself .
thanks