I would like to know how to prevent form submission when the kendo upload has a validation error. I know I can disable the submit button, but I would prefer when the button is clicked to run a validation check, if there is validation, return false on something similar.
1 Answer, 1 is accepted
0
Nikolay
Telerik team
answered on 03 Feb 2023, 07:07 AM
Hi Benjamin,
You can validate the Kendo UI Upload component on form submit by using the Kendo UI Validator. To validate whether a file is selected and that the selected file has the correct extension, create a custom rule for the Validator.
Please check out the following example demonstrating this in a runnable demo:
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/.