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

大佬, validator 本身有多语言包, 要不要考虑支持以下啊. #325

Open
nuan1989 opened this issue Nov 6, 2024 · 0 comments
Open

Comments

@nuan1989
Copy link

nuan1989 commented Nov 6, 2024

"github.com/go-playground/validator/v10/translations/zh" //这是validator自带的多语言包.

可以给Config增加一个可选参数设置validator错误提示的语言,

比如 SetTranslator:"zh",

没设置SetTranslator默认就英文. 对存量的项目也没啥影响.

这样是不是就更加人性化啊.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants