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

设置了AddTranslates,eq_field验证不通过时,提示信息里面的字段名没有使用AddTranslates添加的字段翻译名称 #111

Closed
snail007 opened this issue Nov 11, 2021 · 0 comments
Assignees
Labels
bug Something isn't working resolved

Comments

@snail007
Copy link

相关代码片段:

v := data.Create()
v.AddTranslates(map[string]string{
        "username":"账号",
	"password":"密码",
	"password2":"重复密码",
})
v.StringRule("username", "required")
v.StringRule("password", "required|eq_field:password2|minLen:6|max_len:32")

当password值不等于password2时,提示:密码 值必须等于该字段 password2,发现password2并没有使用设置的翻译名称:重复密码.

@inhere inhere added the bug Something isn't working label Nov 11, 2021
@inhere inhere closed this as completed in 4f070f2 Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved
Projects
None yet
Development

No branches or pull requests

2 participants