Perform an action on validation result

2 posts, 1 answers
  1. Answer
    A G
    A G avatar
    3 posts
    Member since:
    Dec 2005

    Posted 28 Mar 2013 Link to this post

    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) ?

  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 29 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top