[Answered ]-Regex email validation django

2👍

request does not have a form attribute. Since you already have if request.method == "POST" – you can safely do the following:

change

request.form['email']

with

request.POST['email']

Ideally, you should be using django forms for handing the validations etc. Django forms have better validation logic, regex validators, etc..

Leave a comment