Skip to content

Cannot contain "{" and "}" in the parameter text when using func (t *translator) Add(key interface{}, text string, override bool) error #27

Open
@pwli0755

Description

@pwli0755

Cannot contain "{" and "}" in the message when using method func (t *translator) Add(key interface{}, text string, override bool) error

I want to custom a password validitor with tag valid-password, which requires password can contains a-zA-Z0-9 and (~!@#$%^&*()[]{}|/?,.<>) only, and I'm using the universal-translator to custom the error message when validate fails. The point is when the customed error message contains "{" and "}",there will be an error!

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