-
Notifications
You must be signed in to change notification settings - Fork 161
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
Support for multibyte strings #105
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
len(string)
does not count by characters but by bytes, so if a multibyte string is specified for validation, it cannot be validated by characters.In order to accurately determine the number of characters,
len([]rune(string))
should be used.go-proto-validators/plugin/plugin.go
Line 446 in 32a686a
v0.3.2 generated
I think this is a good way to fix it.
The text was updated successfully, but these errors were encountered: