Missing field validation on user account edit I've been implementing a user account page with Craft Commerce and copied over the template found here: https://docs.craftcms.com/v3/dev/examples/user-profile-form.html#simple-profile
The issue is though that the form doesn't seem to show any errors for individual fields, you just get the generic error message in the flash response.
If you take the example from the above link and enter an intentionally invalid email address (e.g a random string) theres no error response for the email field, just a generic &quot;Couldn't Save User.&quot; response.
I've tried dumping out {{ craft.app.session.get('error') }}  in an attempt to see if theres some extra data and its just the above error.
Am I missing something here, or is it just not possible to get field based error messages out of Craft CMS / Craft Commerce?
Errors for the users/save-user action are recorded against the user object, not the session object. If the user is logged-out, the object is named user but if they are logged-in you must use currentUser.
Generally speaking you can retrieve errors from Yii objects in several ways, but for field-by-field errors, I prefer the simplicity of getFirstError() (You might also want to use getErrors() or getErrorSummary()). Here's what I'm using for each question:
{% set user = currentUser ?? user ?? null %}
...

&lt;li class=&quot;{{ user is defined and user.getFirstError('email') ? 'has-error' }}&quot;&gt;
    &lt;label for=&quot;email&quot;&gt;Email &lt;em&gt;&amp;bull;&lt;/em&gt;&lt;/label&gt;
    &lt;input required id=&quot;email&quot; type=&quot;email&quot; name=&quot;email&quot; value=&quot;{{ user is defined ? user.email }}&quot;&gt;
    {% if user is defined and user.getFirstError('email') %}
        {% include '_partials/fieldErrors.twig' with { errors: user.getErrors('email') } %}
    {% endif %}
&lt;/li&gt;

(You could of course use a macro instead of an include as many examples demonstrate).
fieldErrors.twig:

{% if errors %}
    &lt;ul&gt;
        {% for error in errors %}
            &lt;li&gt;{{ error }}&lt;/li&gt;
        {% endfor %}
    &lt;/ul&gt;
{% endif %}