0

http://flask.pocoo.org/snippets/64/

I was reading the Flask docs.

I was just wondering if there is an error in the docs or maybe there's something I don't understand.

Shouldn't "if form.validate_on_submit():" be "if form.validate()"?

If not, how is the validate method used in the instance?

Thank you very, very much in advance

4

1 回答 1

2

From the docs:

validate_on_submit()

Checks if form has been submitted and if so runs validate. This is a shortcut, equivalent to form.is_submitted() and form.validate()

于 2012-12-08T03:09:17.670 回答