Skip to content

Can't access message variables from outside #432

@adambalint-srg

Description

@adambalint-srg

Feature Request

Q A
New Feature no
RFC no
BC Break no

Summary

I'm fighting with the new refactor, and found an other problem. I'm developing an API backend, and the translation stuff happens on frontend, so I'm not rendering the validator messages. I serve the key of the validation message (e.g. NumberComparison.notLessInclusive ), and the variables in it. But getMessageVariables method has been removed, so it is impossible to get details about messages after validation, because:

  • Can't extend NumberComaprison validator, because it's final
  • With decoration I can't access message variables, because of the missing getMessageVariables
  • Can't get options (which can be variables, but it's not sure) from validator, because getters have been removed

The only option is to get out the rendered message, and from this I can't parse the variables.
Why this method has been removed? How do you think I should hack this situation? :/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions