mardi 6 novembre 2018

how do i check two request.form elements to see if they are equal in python?

if (len(request.form['password']) == len(request.form['confirm_password']))
        flash("password must be equal to your confirm password", 'password', 'confirm_password')

I am creating a reg form for classwork. I want to set this validation to check if the passwords are equal. I think thats how you right it, but it is giving me a syntax error. if you guys can point me in the right direction that would be greatly appreciated.

Thanks

Aucun commentaire:

Enregistrer un commentaire