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

Override validation message with custom icon

1 Answer 95 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 26 Nov 2013, 09:20 PM
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.


Thanks!

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 27 Nov 2013, 12:46 PM
Hello Nathan,

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

<form>
  <input name="firstName" required /><br />
  <button>Click Me</button>
</form>
 
<script>
  $("form").kendoValidator({
   //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>'
  });
</script>

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