Skip to content

Augment FieldError.java's javadoc#36559

Open
ottlinger wants to merge 1 commit intospring-projects:mainfrom
ottlinger:patch-1
Open

Augment FieldError.java's javadoc#36559
ottlinger wants to merge 1 commit intospring-projects:mainfrom
ottlinger:patch-1

Conversation

@ottlinger
Copy link
Copy Markdown
Contributor

to make clearer that defaultMessage is not a i18n key from your application bundle, but a static string. Resulting in a problem that setting defaultMessage means no i18n. If you want i18n you should use the code parameter.

Behaviour shown in:

to make clearer that defaultMessage is not a i18n key from your application bundle, but a static string.
Resulting in a problem that setting defaultMessage means no i18n. If you want i18n you should use the code parameter.

Behaviour shown in:
* https://github.com/ottlinger/custom-validation-messages-1029
* reported and resolved via thymeleaf/thymeleaf#1029

Signed-off-by: P. Ottlinger <ottlinger@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@DhruvTheDev1 DhruvTheDev1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple but effective change. By adding 'static' to the defaultMessage description it helps to prevent from accidentally passing translation keys into the wrong parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants