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

[Validator] Add a media_type validator #277

Open
Mth0158 opened this issue Nov 7, 2024 · 0 comments
Open

[Validator] Add a media_type validator #277

Mth0158 opened this issue Nov 7, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Mth0158
Copy link
Collaborator

Mth0158 commented Nov 7, 2024

We could create a new validator called media_type whose purpose would be to validate the media type (ie the first part of the content_type, application, image, video and other).
It could make things easier to write, rather than a content_type: /\Aimage\/.*\z/.

FYI

@mediatype, @subtype = content_type.split('/', 2)
@Mth0158 Mth0158 added enhancement New feature or request good first issue Good for newcomers labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant