<p>Any login validation errors are passed back to the form and available via the Twig <code>{{ errorMessage }}</code> variable.</p>

<p>You can see an example of how to display them on a login form here: <a href="http://buildwithcraft.com/docs/templating/login-form" rel="nofollow">http://buildwithcraft.com/docs/templating/login-form</a></p>

CC BY-SA 3.0
2014-09-14T16:49:46.627Z
Thanks Brad - totally missed that and useful to know. Error messages may be a good section for the docs, as it's something always found in the other topic areas.
Dan G
CC BY-SA 3.0
2014-09-12T15:59:15.923Z
2014-09-12T15:59:15.923Z
Brad Bell
<p>I am looking for some advice on how best to add error messages (eg incorrect password / username) on a custom Login form.</p>

<p>Tried the usual routes for documentation but have seen nothing as yet - all help appreciated. </p>

<p>Dan</p>

CC BY-SA 3.0
2015-01-31T07:50:23.500Z
I'm having the same issue, following the docs with: `{% if errorMessage is defined %} {{ errorMessage }} {% endif %}` But receiving no error messages if email or password are invalid: http://melnet.org.nz/professionals
Ryan
<form>
Login form error messages
# Login form error messages

(Asked by: username_0 on 2014-09-12)

I am looking for some advice on how best to add error messages (eg incorrect password / username) on a custom Login form.

Tried the usual routes for documentation but have seen nothing as yet - all help appreciated.

Dan

**Tags:** form
> **Comments:**
> **username_1**: I'm having the same issue, following the docs with: `{% if errorMessage is defined %} {{ errorMessage }} {% endif %}` But receiving no error messages if email or password are invalid: http://melnet.org.nz/professionals  

---

## 1 answers

### Answer by username_2 on 2014-09-12. Score: 1 | Accepted answer

Any login validation errors are passed back to the form and available via the Twig `{{ errorMessage }}` variable.

You can see an example of how to display them on a login form here: <http://buildwithcraft.com/docs/templating/login-form>

> **Comments:**
> **username_0**: Thanks Brad - totally missed that and useful to know. Error messages may be a good section for the docs, as it's something always found in the other topic areas.  

---

