FileUpload: when multiple files are selected and more than one has errors only only one message is shown #13397
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When I select more than one file either by opening the file chooser or drag to the drag and drop and if more than one is invalid - wrong type, file size limit exceeded , only one message is shown.
I believe the problem is in the "validate" method that is cleaning the "msgs" array in every file validation:
The code is:
this.msgs = []
And should be:
this.msgs ??= []
Environment
Windows
Reproducer
No response
Angular version
16.1.3
PrimeNG version
16.0.2
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.17.0
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
Display all files with errors and not only the last one validated
The text was updated successfully, but these errors were encountered: