Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CallableRule.php #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

iAvenger01
Copy link

Fixed a bug where custom message translation was not performed

What was changed

The interpolation method has been changed to call the translation method

Why?

My filter looks like this
`
class MyFilter extends Filter implements HasFilterDefinition
{
#[Post]
public string $name;

public function filterDefinition(): FilterDefinitionInterface
{
    return new FilterDefinition([
        'name' => [
            ['string', 'error' => '[[Must be a string]]']
        ]
    ]);
}

}
and my translation file looks like this
return [
'Must be a string' => 'Поле должно быть строкой'
]
`

Checklist

  • Closes #
  • Tested
    • Tested manually
    • Unit tests added

Fixed a bug where custom message translation was not performed
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