4 ms·
Not everything that posts submissions to HN is a browser that will honour the maxlength attribute. For example, there are various mobile apps that scrape HN an
by andyjohnson0 12y ago
Not everything that posts submissions to HN is a browser that will honour the maxlength attribute. For example, there are various mobile apps that scrape HN and allow you to submit urls.
Server side validation is entirely appropriate.
- repsilat 12y agoServer-side validation is always appropriate, but client-side validation is often (and certainly in this case) worth having as well. I think limiting the number of characters is a good solution when Javascript isn't available, but warning the user that their input is too long is a more friendly solution where possible.