[whatwg] <textarea> maxlength vs. wrap (Web Forms 2.0 2004-06-27)
Ave.Wrigley at itn.co.uk
Thu Aug 12 06:38:47 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?
This is a very good point. My feeling is that the maxlength should apply
to the number of characters that are submitted, although I am surprised
that this is different from the number seen by the DOM. I guess the
correct implementation would be for the DOM value to include the line
This email (and any attachments) is intended solely for the individual(s) to whom addressed. It may contain confidential and/or legally privileged information. Any statement or opinions therein are not necessarily those of ITN unless specifically stated. Any unauthorised use, disclosure or copying is prohibited. If you have received this email in error, please notify the sender and delete it from your system. Security and reliability of the e-mail and attachments are not guaranteed. You must take full responsibility for virus checking.
Independent Television News Limited,
Registered No. 548648 England,
VAT Reg. No: GB 756 2995 81,
200 Gray's Inn Road, London WC1X 8XZ,
Telephone: 020 7833 3000.
More information about the whatwg