Hacker News new | ask | show | jobs
by andyjohnson0 4219 days 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.

1 comments

Server-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.