R
R
Roman Morozov2018-09-17 21:22:53
Python
Roman Morozov, 2018-09-17 21:22:53

Why is Python Flask form validation not working in Safari browser?

Good evening, I can't figure out why the Python Flask form validation fails in the Safare browser. After clicking on the "send" button - the line if forms.validate():does not go further. When at the same time on any other browser - the form is sent and the data gets into the DB.

forms = GeneralForm(request.form)

    if forms.validate():
        try:
            apps = Messages(request.form['name'], request.form['phone'], request.form['state'])
            db.session.add(apps)
            db.session.commit()
        except KeyError as e:
            db.session.rollback()
            app.logger.error(e)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question