W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2011

[Bug 13769] Whitespace-only values should be considered empty in required form fields

From: <bugzilla@jessica.w3.org>
Date: Sat, 03 Sep 2011 23:14:53 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QzzQL-0005jZ-RS@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13769

--- Comment #10 from Marat Tanalin (tanalin.com) <mtanalin@yandex.ru> 2011-09-03 23:14:53 UTC ---
(In reply to comment #9)
> (In reply to comment #5)
> > The question to me is how common is it to have a required field where
> > white-space only is a ok value? It seems to me that this would be a very rare
> > edge case.
> 
> How common is it to have a required text field where a single period is an ok
> value? Or a single dash? Or the string "no answer provided"? Or a non-breaking
> space?

Whitespace has one fundamental distinctive: whitespace is INVISIBLE exactly
like empty string (and unlike nonwhitespace characters that can be manually
typed-in from keyboard -- like period or dash you mentioned).

That's why whitespace is always trimmed on server-side before server-side
validation on any well-developed website. Client-side validation should be just
consistent with server-side one.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Saturday, 3 September 2011 23:14:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:03 UTC