Skip to content

Get field error code #90

Closed
Closed
@mohic

Description

@mohic

Hi,

In my project, I want to get error code from a specific field but this method is not available.

For the moment I have resolved my problem with this code:

<th:block th:each="detailedError : ${#fields.detailedErrors()}">
    <span th:if="${detailedError.getFieldName() == 'emailAddress'} and ${detailedError.getCode() == 'myProject.subscription.validation.emailAddress.alreadyExists'}" class="textError">This e-mail address is already exists</span>
</th:block>

It will be great if you add possibility to make:

${#fields.errorCode('emailAddress')}

Best Regards,
Christophe

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions