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

image/svg+xml is not supported in mimes() validator #4230

Closed
2 of 5 tasks
martindzejky opened this issue Apr 28, 2023 · 1 comment
Closed
2 of 5 tasks

image/svg+xml is not supported in mimes() validator #4230

martindzejky opened this issue Apr 28, 2023 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@martindzejky
Copy link

What happened?

mimes(file, ['image/svg+xml'])

returns false if file is an SVG image file. It should return true. In

const regex = new RegExp(`${mimes.join('|').replace('*', '.+')}$`, 'i');
you also need to escape the + sign.

Reproduction steps

No response

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

NA

Code of Conduct

@martindzejky
Copy link
Author

Sorry for not including a demo link, I wasn't able to quickly get one working 🤦 . I hope the issue is self-explanatory and does not need a reproduction link.

@logaretm logaretm added the 🐛 bug Unintended behavior label Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants