It would be nasty if a database crashed or a disk got filled with terabytes of data, sent by some user out of ignorance, mistake, or malevolence.
User agents may wrap visible text lines to keep long lines visible without the need for scrolling.
For these users, the 'valid' form of the textarea widget is a user-hostile control.
The fundamental problem here is that there are two different mental models (and corresponding implementations) of "typing text".
The second one, now more common among "ordinary users", was introduced by text processing programs (as opposite to text editors), and it means that the user need not, and normally should not, hit Enter or Return but just watch the program divide the text into lines.
- Enter or Return generally means end of in this model.
Your browser probably splits at least some of the strings to two lines.
Such splitting can be disastrous if the user wants to type a URL into a textarea, especially if "hard" wrapping is on, since the URL will actually be split into pieces.The first one, the older one, is based on explicit line breaks entered by the user.It corresponds to typing on a typewriter, and it is common among programmers, and it's also the model on which several Internet protocols (like E-mail and Usenet protocols) are based.Client-side scripting in Java Script can be used for checks in order to give the user faster feedback when he tries to exceed a limit.This document describes briefly both simple Java Script checking on form submission and more real-time checking based on counting characters as they are typed.When wrapping, either "soft" or "hard", is applied, the browsers (Netscape, IE, Opera) basically break between "words", i.e. This is natural and acceptable, assuming that wrapping is acceptable at all.