-
Notifications
You must be signed in to change notification settings - Fork 0
[$50] Max message length handling #535
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
Comments
Challenge https://www.topcoder.com/challenges/f5f96124-617d-411d-940d-6f1d91e9db84 has been created for this ticket. |
Challenge https://www.topcoder.com/challenges/f5f96124-617d-411d-940d-6f1d91e9db84 has been assigned to obog. |
@jmgasper Please apply PRs: Thanks! TestingPlease clear browser cache before testing. |
Payment task has been updated: https://www.topcoder.com/challenges/f5f96124-617d-411d-940d-6f1d91e9db84 |
@atelomycterus I entered a long text(characters 15946 according to https://www.charactercountonline.com/) Screencast.2021-04-06.mp4 |
@sdgun I'll check how Vanilla counts comment body length on the server side. Keep you updated. |
@jmgasper Fixed for a comment form. I'll fix validation rules for discussion from in #538. I added some details about special characters. Please apply PRs:
Thanks! Special characters15946 according to https://www.charactercountonline.com/ CR and LF are special characters (ASCII 13 and 10 respectively, also referred to as \r\n) that are used to signify the End of Line (EOL). All characters are displayed in Notepad++: https://www.charactercountonline.com/ ignores CRLFs (2x56).
On client, "Comment is 2 characters too long" was displayed because as per the HTML5 specification, textarea uses the LF character for new lines (\n), but it also understands and internally transforms \r and \r\n. To count for the CRLF character pair, need to replace LF with CRLF, before the comment form is validated.
All characters are counted on the server side. TestingPlease clear browser cache before testing. |
@sdgun ☝️ |
Verified in Dev. |
@jmgasper Please apply PRs:
TestingPlease clear browser cache before testing |
Verified in Dev with #538 |
To go along with #483 , we need to also handle the case where the message is too long (over the max).
We'll have the display as the same - red rectangle around the text area with a message in red below:
Comment is XXXX characters too long
The text was updated successfully, but these errors were encountered: