3 Answers, 1 is accepted
0
Hi Michael,
The validation will fire twice, because it is triggered once by the blur event of the input element and once when the Grid tries to close the cell for incell edit mode or when the Update button is clicked. As discussed in the forum thread below, this behavior could not be changed:
Best Regards,
Konstantin Dikov
Telerik by Progress
The validation will fire twice, because it is triggered once by the blur event of the input element and once when the Grid tries to close the cell for incell edit mode or when the Update button is clicked. As discussed in the forum thread below, this behavior could not be changed:
Best Regards,
Konstantin Dikov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
0

Ethan
Top achievements
Rank 1
answered on 24 Mar 2020, 10:38 AM
How come it fires twice for pop-up edit aswell in grid.This is cause xss vulnerabilities when a html tag with a script and onerror is used with the custom validator (kk</script><img src=1 onerror='alert(223)'/>)
0
Hi Ethan,
Indeed, the behavior is clearly observed when the Kendo UI Grid is utilizing the PopUp edit mode. In short, the validation is triggered twice - once when the cell is blurred so that if any change is needed, the user is prompted immediately. And once when the Update button is clicked - this is needed to validate the fields that have not been changed and for which the validation of blur has not been triggered.
As an alternative approach, you could remove the custom validation from the validation configuration of the field and execute it within the Save event handler, manually.
Regards,
Tsvetomir
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Our thoughts here at Progress are with those affected by the outbreak.