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

feat: File field and validators #282

Merged
merged 5 commits into from Jan 15, 2024

Conversation

uncle-lv
Copy link
Contributor

Migrate the File field and FileType FileSize validators from APIFlask(#280).

Example usage:

class ImageSchema(Schema):
            image = File(required=True, validate=[FileType(['.png'], FileSize(min='1 MiB', max='2 MiB')])

@uncle-lv
Copy link
Contributor Author

The file validate.py didn't generate docs. I tried to slove it, but failed.

@sloria
Copy link
Member

sloria commented Jan 15, 2024

thanks a lot! this is great

@sloria sloria enabled auto-merge (squash) January 15, 2024 15:31
@sloria sloria merged commit 8b40ea7 into marshmallow-code:dev Jan 15, 2024
7 checks passed
@uncle-lv uncle-lv deleted the file-and-validators branch January 23, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants