-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
maxCodePoints / minCodePoints (UTF-32 code points) #875
Comments
You can use our new grapheme actions to count emojis that we added in v1.0.0-beta.1: https://github.com/fabian-hiller/valibot/releases/tag/v1.0.0-beta.1 |
The number of UTF-16/32 code points per grapheme is unlimited. You should combine https://stackoverflow.com/questions/71011343/maximum-number-of-codepoints-in-a-grapheme-cluster |
If you write your backend in Go or Rust, UTF-32 length is commoner than UTF-16. ( |
Thank you for your detailed feedback! How would you implement such an action? We also have byte actions like |
We can implement it based on the existing You can combine |
Can you provide a code example for the if-statement to check the maximum code points? |
Do you mean this?
|
The length limit of VARCHAR in some RDBs is the number of UTF-32 code points.
maxLength counts an emoji and some kanji as two.
Password requirements by NIST:
https://pages.nist.gov/800-63-3/sp800-63b.html
This requires we should count an emoji (not compounded ones) or other 4-byte chracters as 1 character in a password.
The text was updated successfully, but these errors were encountered: