Feature request: Easier upload validation built-in. #8522
iamlinkus
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be super awesome if payload had upload validation (and validation messages) built-in. I'd imagine something like this (notice that I've moved mimeTypes to the accept prop):
And I'd imagine showing a validation error within or near the upload field with the validation criteria would be super informative to the user.
At least for my case, I've not found an easy way to do this, even though it's something 99% of our projects need when preparing the admin panel to less tech-savvy clients and it has cause a lot of problems already. And implementing the validation through the hooks needs a lot of boilerplate and still has limitations in terms of how and where we can display the validation errors.
Before payload, we've worked with KirbyCMS for 8 years, and their upload validation implementation was bulletproof and extremely easy to set up for any kind of file: https://getkirby.com/docs/reference/panel/blueprints/file#accept__extended
Beta Was this translation helpful? Give feedback.
All reactions