I have a set of GET parameters that I want to validate. Can I use WTFORMS for that purpose? All examples I find are of POST requests.
Pass request.args
instead of request.form
when instantiating the form. They both use the same data structure, but args
contains query args instead of form data.
form = MyForm(request.args)
Flask-WTF will pass form
if nothing is specified, but you can still override it by passing args
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With