Skip to content

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

Open
bicstone wants to merge 1 commit into
marmelab:masterfrom
bicstone:fix/declare-validation-unique-in-TranslationMessages
Open

[TypeScript] Add missing ra.validation.unique to TranslationMessages#11337
bicstone wants to merge 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
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.

1 participant