[whatwg] <textarea> maxlength vs. wrap (Web Forms 2.0 2004-06-27)

Andrew Smith whatwg at neworbit.org
Wed Aug 11 10:51:21 PDT 2004


When a <textarea> has wrap="hard", does the maxlength refer to the
number of characters entered by the user (and seen by the DOM) or the 
number of characters submitted by the form, i.e. including the extra 
line breaks?

The definition of maxlength says it is "the maximum length of the input,
in terms of numbers of characters". I can see why, from an 
implementation point of view, you would want to base it on the number of 
characters seen by the DOM. However, this might be counter-intuitive for 
developers, who might expect it to limit the number of characters 
submitted (even if the server should handle this situation).

Could the definition of wrap="hard" take this into account?


Andrew





More information about the whatwg mailing list