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(components): [input] unify async-validator
string length calc
#16757
Conversation
🧪 Playground Preview: https://element-plus.run/?pr=16757 |
async-validator
character length calcasync-validator
string length calc
Question: Why do you choose the length property which counts the length of a string in UTF-16 code units? Why not count the length in code points? |
Follow the calculation method of the tag's native |
Well, that makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kooriookami I think the spelling errors in the original comments may not need to be corrected. 😀 |
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.fix #16756
The internal string length calculation method of
async-validator
is inconsistent with input. In order to keep the results consistent, the calculation methods of the two are unified.Since
async-validator
has not been updated for two years, the fastest, most efficient and controllable way is to generate patch file modifications, so I made this modification.