Skip to content

[Validator] Add a media_type validator #277

Open
@Mth0158

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions