How to show errors in the FileSelect kendoFileSelectFileTemplate

1 Answer 265 Views
FileSelect
Murray
Top achievements
Rank 1
Iron
Veteran
Murray asked on 20 Apr 2022, 09:28 AM
If I have a <kendo-fileselect [restrictions]="myRestrictions">  and within this I have my own kendoFileSelectFileTemplate, I no longer see file restriction errors. How can I see these using a custom kendoFileSelectFileTemplate?

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 22 Apr 2022, 11:56 AM

Hello Murray,

The errors caused by failed restrictions could be accessed through the validationErrors field of the FileInfo object.

https://www.telerik.com/kendo-angular-ui/components/uploads/api/FileInfo/#toc-validationerrors

The file(s) are passed to the template as explicit context. An example of the same can be found here

https://www.telerik.com/kendo-angular-ui/components/uploads/fileselect/templates/#toc-file-template

Let me know if this information helps or I could assist further.

Regards,
Dimiter Madjarov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
FileSelect
Asked by
Murray
Top achievements
Rank 1
Iron
Veteran
Answers by
Dimiter Madjarov
Telerik team
Share this question
or