Override validation message with custom icon

2 posts, 0 answers
  1. Nathan
    Nathan avatar
    3 posts
    Member since:
    Dec 2012

    Posted 26 Nov 2013 Link to this post

    Is it possible to replace the validation message with my own image? I would like to provide an image and set it's title to the validation message. If there is a way to provide a validation message template, that would be great.

  2. Rosen
    Rosen avatar
    3253 posts

    Posted 27 Nov 2013 Link to this post

    Hello Nathan,

    You can modify the Validator's message appearance by modifying the errorTemplate option. Similar to the following:

      <input name="firstName" required /><br />
      <button>Click Me</button>
       //this is how the default template looks like
        errorTemplate: '<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-warning"> </span> #=message#</span>'

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top