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

Fix length validations to count the length of the string using by utf8.RuneCountInString(). #740

Merged
merged 4 commits into from Aug 29, 2016

Conversation

@ikawaha
Copy link
Contributor

commented Aug 27, 2016

see #739

@raphael

This comment has been minimized.

Copy link
Member

commented Aug 27, 2016

Makes sense, thank you! Do you think you could add a test as well? Thanks!

@ikawaha

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2016

Thanks! I will try to add some test.

@ikawaha ikawaha changed the title Fix length validations to count the length of the string using by utf8.RuneCountInString(). [WIP] Fix length validations to count the length of the string using by utf8.RuneCountInString(). Aug 28, 2016

@ikawaha ikawaha changed the title [WIP] Fix length validations to count the length of the string using by utf8.RuneCountInString(). Fix length validations to count the length of the string using by utf8.RuneCountInString(). Aug 28, 2016

@raphael

This comment has been minimized.

Copy link
Member

commented Aug 29, 2016

Great, thank you!

@raphael raphael merged commit cb22ccb into goadesign:master Aug 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

ikawaha added a commit to ikawaha/goa that referenced this pull request Dec 13, 2016

Fix length validations to count the length of the string using by utf…
…8.RuneCountInString(). (goadesign#740)

* Fix length validations to count the length of the string using by utf8.RuneCountInString().

* Add SimpleImport to MediaType and UserMediaType.

* Fix generation codes of InvalidLengthError

* Add a length validation test for string type

raphael added a commit that referenced this pull request Dec 13, 2016

Fix the generation of length validation for strings that contain mult…
…i-byte UTF-8 characters. (#962)

* Fix length validations to count the length of the string using by utf8.RuneCountInString(). (#740)

* Fix length validations to count the length of the string using by utf8.RuneCountInString().

* Add SimpleImport to MediaType and UserMediaType.

* Fix generation codes of InvalidLengthError

* Add a length validation test for string type

* Use att.Type.Kind() == design.StringKind instead of att.Type.Name() == "string"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.