-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FileUpload: maxFileSize error is not shown in template #6404
Comments
It would be helpful if you provided a StackBlitz or at a minimum, some code here demonstrating what you're trying to do. |
It is very simple - just open the stackblitz link of section Uploader UI can be customized with templating, try to upload a normal image, then modify the On the other side, if you do the same in the Advanced section, you will see an error: For this reason (and also due to design) I wanted to use some callback in order to show errors:
|
The error does not show up because the custom I have created a PR that the team can decide if the example should be extended, but in the mean time take a look to see how you can implement it on your end. |
Thanks, I managed to show it inside content by doing this:
However, what I need is a hook to be able to show the message inside a Toast component, and this is something I cannot find in documentation. Is it possible? |
It seems the only area that the info regarding these custom validations appear is within this Here is a little proof of concept. There is likely an even better way to do it natively, otherwise an expansion of functionality would require opening an enhancement request in PrimeVue discussions. |
It is not a core issue and you can always improve the live example yourself. |
#6404 fix: add messages to FileUpload templates
I am using template (https://primevue.org/fileupload/#template), and would like to access
maxFileSize
error from a method in order to show it in a toast component. Is it possible?The text was updated successfully, but these errors were encountered: