Skip to main content

How do I modify error messages?

I'd like to change the wording of an error message or perhaps change it to another language. How do I do that?

Official response from

This is something that can be done using Javascript. Using this code example below you can target specific tags in the error message that contains the text you'd like to replace. Below, I'm locating the <div class="form-errors"> and traversing down through the <ul> and <li> tags until I find the one containing the text "Email1" in which case I replace it with my new text.

<!-- CHANGE ERROR MESSAGE -->
<script language="JavaScript">

$(".form-errors ul li:contains('Email')").text('Email address is required.');

</script>

Notice the default error message says "Email1", but is later switched to Email in the images below.

error-msgs.jpg


UPDATE: Check out the suggestion by Alex Flint below for a more complete solution.

Share this post

Showing 14 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.