W3C home > Mailing lists > Public > www-validator@w3.org > November 2012

Re: Validator not consider the pattern attribute

From: David Dorward <david@dorward.me.uk>
Date: Sun, 25 Nov 2012 15:08:55 +0000
Cc: www-validator@w3.org
Message-Id: <66E2F832-F255-4FEB-9DAB-26A2179C502F@dorward.me.uk>
To: Otávio R. Rossi <otavio@rapordo.com>
On 25 Nov 2012, at 03:07, Otávio R. Rossi <otavio@rapordo.com> wrote:
> The attributte "pattern" is not considerated for W3C Validator Markup.

Yes, it is. 

> Look at this exemple
> http://validator.w3.org/check?uri=http%3A%2F%2Frapordo.com&charset=%28detect+automatically%29&doctype=Inline&group=0

There are no complaints about the existence of the pattern attribute there.

> In this case, the Validator show 3 errors because i use one regular expression in attribute "pattern", but in this case "&" is not incorrect.

The errors are because you have written a regular expression and then expressed it in text instead of in HTML. Since you are including it in an HTML document, you must express it in HTML where the & character means "Start of a character reference" and needs to be represented as &amp; if you way to say "ampersand".

David Dorward

Received on Sunday, 25 November 2012 15:09:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:31 UTC