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

Supported CharsMinLength and CharsMaxLength to limit multibyte characters properly #656

Conversation

smihica
Copy link
Contributor

@smihica smihica commented Oct 13, 2021

Hello 👋

I supported multibyte string in StringMinLength and StringMaxLength.
It originally counted byte length of the String (Is it intended?)

I'm not sure but I thought it is natural counting chars len in the String than bytes len in the String.
because basically JSON String is utf-8 encoded multibyte string.

Thank you

@sunli829
Copy link
Collaborator

Thank you!

But I think CharsMinLength and CharsMaxLength should be added instead of changing the behavior of StringXXXLength, what do you think? 😁

@smihica
Copy link
Contributor Author

smihica commented Oct 13, 2021

it's also good i think 😃

@smihica
Copy link
Contributor Author

smihica commented Oct 13, 2021

Shall I write it?

@sunli829
Copy link
Collaborator

Shall I write it?

Of course, if you want. 🙂

@smihica
Copy link
Contributor Author

smihica commented Oct 13, 2021

done 🙂

@smihica smihica changed the title Supported multibyte string in StringMinLength and StringMaxLength Supported CharsMinLength and CharsMaxLength to limit multibyte characters properly Oct 13, 2021
@sunli829
Copy link
Collaborator

Thanks!😄

@sunli829 sunli829 merged commit d3ea9ce into async-graphql:master Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants