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
[v4] how to custom error message with locale message? the {length}
params pass wrong
#2898
Comments
{length}
params pass wrong
Thanks for reporting this, looks like the locale file wasn't updated to match the newest version. Fixing it now |
closed in #2898 and I tagged a release just now |
@logaretm Hello! I still get the same error as TS: {length} not translated. I also tried {min}.
I follow this guide https://vee-validate.logaretm.com/v4/guide/i18n. My full code:
|
Did you try |
@logaretm thanks, 4.0.0-alpha.7 working. Sorry, i did't saw any upper alpha.3. I run yarn upgrade just now and @vee-validate/i18n is still aplha.3. Maybe tags broken? |
|
Versions
Describe the bug
{length}
field inlocale
json, not replace correctly.To reproduce
Steps to reproduce the behavior:
latest
vee-validate and vuemain.ts
*.vue
fileExpected behavior
min
,length
rule display the correct custom message, like:min
rule:right:
密码必须至少有6个字符
wrong:
密码必须至少有{length}个字符
length
rule:right:
验证码长度必须为4
wrong:
验证码长度必须为{length}
Demo link
Here's my .vue file
template
part:Here's my global
vee-validate.ts
file:Desktop (please complete the following information):
Additional context
I change the
@vee-validate/i18n/dist/locale/zh_CN.json
the{_field}
to{filed}
, so the filed name display right.The text was updated successfully, but these errors were encountered: