validator icon indicating copy to clipboard operation
validator copied to clipboard

Separate similar error messages' translations for different rules

Open arogachev opened this issue 2 years ago • 1 comments

Extracted from https://github.com/yiisoft/validator/pull/514#discussion_r1090048741.

Related: #525.

Problem: changing translation for incorrect type message might affect multiple rules. Possible solution: use keys for translation instead, something like "json.incorrectInputMessage".

This can be helpful when a user wants to hide technical details with broader messages for example.

arogachev avatar Feb 01 '23 08:02 arogachev

Is there an example of a translation with a similar problem?

Usage keys added new dependency yiisoft/translator-message-php.

vjik avatar Feb 01 '23 08:02 vjik