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

Feature request : new validator - isMimeType(str) #758

Closed
Ilshidur opened this issue Dec 2, 2017 · 2 comments
Closed

Feature request : new validator - isMimeType(str) #758

Ilshidur opened this issue Dec 2, 2017 · 2 comments

Comments

@Ilshidur
Copy link
Contributor

Ilshidur commented Dec 2, 2017

This is a feature request for the following validator : isMimeType(str).
This function would check if the passed string matches to a correct MIME type.

Examples :

  • isMimeType('application/json') returns true
  • isMimeType('application\json') returns false
  • isMimeType('application/json/text') returns false
  • isMimeType('') returns false
  • isMimeType('json') returns false

By the way I love this lib ! Keep up the good work ! 👍

EDIT : Submitted a PR (#760)

@chriso
Copy link
Collaborator

chriso commented Dec 3, 2017

Good idea. Happy to accept a PR 😄

@chriso
Copy link
Collaborator

chriso commented Dec 9, 2017

Fixed by #760.

@chriso chriso closed this as completed Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants