Need More Info
Last Updated: 12 Nov 2021 11:37 by ADMIN
Sunny
Created on: 09 Nov 2021 19:51
Category: KendoReact
Type: Feature Request
0
Form validations only on Submit
Form validation are happening on every field change. For some complex forms, validations will require a backend api to validate the date. Kendo form should allow an options to only validate before submit happens. 
3 comments
ADMIN
Konstantin Dikov
Posted on: 12 Nov 2021 11:37

Hi Sunny,

It is expected that the event will fire before the async validation finishes and it is up to the developer to create logic for handling it. For example, you can trigger the async validation when the submit button is clicked and within the callback, proceed with the submit logic if the validation passes.

Another thing that you can do is to disable the submit button until the validation finishes. This will prevent the user to click on the Submit button, before the backend validation is finished, but you will have to trigger the validation when the value for that field is changed (and not on submit).

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Sunny
Posted on: 11 Nov 2021 15:03
I noticed a slight problem with proposal. After setting the Boolean values on submit click, the on submit handler still fires before the validations can finish. 
ADMIN
Konstantin Dikov
Posted on: 10 Nov 2021 14:25

Hello Sunny,

The Form component provides 3 different ways for handling validatoin and gives complete control to the developer over the condition for the validation. For the requirement that you have you can use the Form validator and have a boolean variable that you can use when the submit button is clicked and return the validation messages only if the submit button is already clicked:

If you have something different in mind, please provide more information on the exact functionality that you want to see as a built-in feature in the Form component.

 

Regards,
Konstantin Dikov
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/.