Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

HTML5 validation on reputation comment section

Long ago, in a galaxy both far far away and very familiar, reputation used to load in a new window versus in a modal on the same window. Now, however, rep loads inside the current page, rather than on a new window in the browser.

There's some lag between clicking on the button, having the modal come into focus, and having the modal's content load. This itself is not a problem, but in the case of reputation, forgetting to enter more than 10 characters into the <input> that appears causes the new content of the modal to load and show an error. There is no way of going "back" one screen with the modal; you have to close the modal (which takes some time), click the button, wait for the modal to show, wait for the modal to load its content, set how much rep you want to give/take, enter your comment, then submit again. This can get annoying, and takes up some time.

What I propose is the addition of the minlength attribute to the input, that prevents users from submitting the form if there are less than 10 characters in the input.

Code
<input type="text" class="textbox" name="comments" size="35" minlength="10" maxlength="250" value="" style="width: 95%">

[Image: duJEa4W.gif]

Of course, this is only a client-side solution. This works for the 97.29% of people who are not using Internet Explorer 11 or Opera Mini. Of that 97.29%, maybe some people want to disable client side validation to have fun. The server side validation is already in place, so there doesn't have to be any real changes for people who play by the rules.

I believe this suggestion is as simple as possible to make, and will have the most benefit for users, especially on Goodwill Monday when people want to give rep meaningfully. That's hindered by comments that they don't know are too short. It might also be helpful to include the fact that comments need to be 10 or more characters in length on the actual reputation-giving page.
Just like this in post :
There was an error posting your reply: The message is too short. Please enter a message longer than 25 characters.
You want it in  comments right
Hope if they find it useful they will add it
Thank you for this suggestion buddy 🤝
[Image: ngTY83T.gif]
Good suggestion! This would only require a simple template edit, would like to see it added. 🙂
(Jun 5, 2018 02:17 AM)0riginalkillit Wrote:  Just like this in post :
There was an error posting your reply: The message is too short. Please enter a message longer than 25 characters.
You want it in  comments right
Hope if they find it useful they will add it
Thank you for this suggestion buddy 🤝

There's already a client-side notification for posts or replies that are too short. Although I imagine that the entire post/reply goes to the server to validate not just its length, but other content that would cause the content to be rejected.
With reputation now being controlled through a select, not an input, this suggestion doesn't mean anything. Closing it as it's technically resolved.
I like to validate but I'll worry about it more after we have our responsive theme.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by XeenonApr 25, 2017 01:20 PM 10 416 Apr 25, 2017 01:20 PM
Last Post: Omniscient
by Neeeeeeeeeel.-Sep 30, 2016 06:24 AM 10 487 Sep 30, 2016 06:24 AM
Last Post: Riyu
by $lickMay 26, 2016 02:56 PM 1 223 May 26, 2016 02:56 PM
Last Post: Omniscient