yiisoft / yiisoft/validator

Separate similar error messages' translations for different rules

Open
#526 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:under discussion type:enhancement
Dominant language
PHP
Stars
167
Forks
47
Avg merge
1d 19h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the discussion in PR #514 and related issue #525, then trace how translations for similar rule error messages are selected. Separate translation keys so changing one rule does not affect others, while allowing users to replace technical details with broader messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.