Skip to content

[TypeScript] Add missing ra.validation.unique to TranslationMessages - #11337

Merged
fzaninotto merged 1 commit into
marmelab:masterfrom
bicstone:fix/declare-validation-unique-in-TranslationMessages
Aug 31, 2026
Merged

[TypeScript] Add missing ra.validation.unique to TranslationMessages#11337
fzaninotto merged 1 commit into
marmelab:masterfrom
bicstone:fix/declare-validation-unique-in-TranslationMessages

Conversation

@bicstone

@bicstone bicstone commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Problem

TranslationMessages does not declare ra.validation.unique, even though react-admin emits that message key and ra-language-english ships it.

Solution

Declare unique: string in ra.validation, in the same position as in ra-language-english.

How To Test

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

ra-language-english has shipped `ra.validation.unique` since the unique
validator was introduced, but the interface never declared it. Because
`ra.validation` carries an index signature for custom messages, the
omission compiles silently, so a translation package typed as
TranslationMessages can drop the key without any error and let Polyglot
render the raw key name to end users.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c5Smg7wiDnqQPS6HeWrMK
@fzaninotto
fzaninotto merged commit 97be504 into marmelab:master Aug 31, 2026
14 checks passed
@fzaninotto

Copy link
Copy Markdown
Member

Thanks!

@fzaninotto fzaninotto added this to the 5.15.2 milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants