qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

prevent validation errors when creating too-short new comment threads

Open cellio opened this issue 1 year ago • 0 comments

meta:291094

Comments have a minimum length before the "post" button is enabled. This check includes leading/trailing whitespace, but such whitespace is trimmed on submission and that can make the comment now too short. In that case, you get either a red-box error or a 422 (with your comment gone), which is not good.

From the user perspective the best thing to do would be to apply that "trim" logic when checking to see whether to allow posting. I don't know if that's expensive (since it has to be checked frequently as you type).

If that's not practical, then can we catch the problem in-page, so you get a message saying "too short after all, sorry" and your draft is still there so you can keep editing?

cellio avatar Aug 09 '24 20:08 cellio