Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MultipleFileField and support validating multiple files #556

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

greyli
Copy link
Member

@greyli greyli commented Mar 8, 2023

Continue #338

  • Add the MultipleFileField field.
  • Update FileRequired, FileAllowed, and FileSize to make them work with multiple files.
  • Add tests for using Length with the files field.

fixes #337
fixes #393

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in docs/changes.rst summarizing the change and linking to the issue. Add .. versionchanged:: entries in any relevant code docs.

@greyli greyli changed the title Add MultipleFileField and support validating multiple file Add MultipleFileField and support validating multiple files Mar 8, 2023
@greyli
Copy link
Member Author

greyli commented Mar 8, 2023

The failed style check is handled in #557.

@greyli greyli force-pushed the multiple branch 2 times, most recently from e7e38ff to a576c35 Compare July 21, 2023 14:38
@greyli
Copy link
Member Author

greyli commented Jul 21, 2023

Not sure why the warnings from flask-babel are treated as errors: https://github.com/wtforms/flask-wtf/actions/runs/5623535426/job/15238419433?pr=556#step:6:129

@azmeuk
Copy link
Member

azmeuk commented Jul 21, 2023

This can be useful to force us to fix the deprecation warnings emitted by other libraries.

However for this one there is not much that can be done on our side since the warning is emitted because of flask-babel: python-babel/flask-babel#230
cc @TkTech is the PR there ok to you?

Anyways, I checked your branch (with the flask-babel patch) and this looks all good to me 👌

@azmeuk
Copy link
Member

azmeuk commented Jul 22, 2023

@greyli you are maintainer, do you want to merge this PR or do you need other pairs of eyes to review it?

@greyli
Copy link
Member Author

greyli commented Jul 23, 2023

Yes, I do want to merge this. Just went through all the changes again and fixed a typo in the docs.

@azmeuk
Copy link
Member

azmeuk commented Sep 29, 2023

@greyli Do you think it this is ready to merge now? Do you want me to merge it and cut a release?

- Add `MultipleFileField` field.
- Update `FileRequired`, `FileAllowed`, and `FileSize` to make them work with multiple files.
- Add tests for using Length with files field.
@greyli
Copy link
Member Author

greyli commented Oct 1, 2023

@greyli Do you think it this is ready to merge now? Do you want me to merge it and cut a release?

I think so. Thanks!

@azmeuk azmeuk merged commit 34088ed into wtforms:main Oct 1, 2023
7 of 8 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Issue with multiple file validation Handle multiple files
2 participants