Skip to content

Support "^ validation error text" format #447

@Zmokizmoghi

Description

@Zmokizmoghi

Hi.
Russian is a fairly complex language, and russian rails community adopted a hack to achieve human readable complex validation messages. The thing is to drop attribute name and wrote custom validations text for required attribute with ^ at the beginning, for example:

ru:
  activerecord:
    errors:
      models:
        person:
          attributes:
            password:
              too_long: "^Ваш пароль слишком длинный, максимум: %{count} символов"

Popular gem for handle russian locale also supports it

But this hack lead to wrong help-text form invalid input:

image

Will you accept pull request with fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions