Edit this page

errorTemplate String

The template which renders the validation message.

The errorTemplate content must be enclosed in a single DOM element parent. There are no restrictions with regard to nested child elements.

Define a custom error template

<form id="myform">
    <input name="username" required /> <br />

        errorTemplate: "<span>#=message#</span>"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article