W3C home > Mailing lists > Public > public-html-comments@w3.org > January 2013

Re: input type alpha

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Wed, 16 Jan 2013 16:36:53 +0200
Message-ID: <50F6BB05.9080009@kolumbus.fi>
To: public-html-comments@w3.org
2013-01-16 16:10, Fred  wrote:

> The input element has a type attribute which allows values such as 
> number, text, etc.
> Number matches only digits.
> Text matches *everything*.
> It would be nice with 'alphabetic' that matches only a-z, not 
> !@#$%/[]{}(), etc.

Using <input type=number> is expected to be implemented so that the user 
can input a number via some user interface, and the set of allowed 
values depends on other attributes of the element, and may allow numbers 
with a decimal part or with a sign.

To specify that a-z only be accepted, you can use <input type=text 
pattern="[a-z]"> or (if uppercase is to be allowed too) <input type=text 

Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 16 January 2013 14:37:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:28 UTC