This is a migrated thread and some comments may be shown as answers.

Perform an action on validation result

1 Answer 75 Views
Validation
This is a migrated thread and some comments may be shown as answers.
A G
Top achievements
Rank 1
A G asked on 28 Mar 2013, 04:51 PM
I'm trying to accomplish a simple task where upon validation result (failed or passed) I want to perform some action, for example set CSS style to a corresponding text element.  I want to do this per form element. Is there a way to do this? Is there as event that one can subscribe to ,like onValidationComplete(validation_result) ?

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 29 Mar 2013, 08:58 AM
Hello,

I'm afraid that currently there is not such event. However, depending on your scenario you may manually trigger the validation (via the validate method) and to take the appropriate action to style the failed elements. 
Also by default a CSS class (k-invalid) is applied to the input elements which does not pass validation. Thus, you may override it in order to customize the appearance of the inputs. Here you can find a small sample which illustrates this.

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Validation
Asked by
A G
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or