[whatwg] pattern attribute

Ian Hickson ian at hixie.ch
Sat Aug 28 07:27:07 PDT 2004


On Mon, 23 Aug 2004, Super-User wrote:
> > >
> > > No, if the regexp is invalid, it is just ignored.
> > 
> > This is both a good thing and a bad thing. Ignoring the regexp makes 
> > sense, but also makes debugging complex regexps a nightmare. Maybe 
> > WHATWG should provide a reference implementation regexp checker and/or 
> > debugger for these purposes?
> > 
> > Thoughts?
> 
> I am inclined to agree. I can't see any benefit in silently failing an 
> invalid regex.

The main benefit would be not exposing the user to author error.


> I don't think you necessarily need a standard checker / debugger (just a 
> standard regex!) but you do need to know when a regex is invalid. After 
> all, this is likely to be a "development time" rather than a "run time" 
> issue, as it is not dependent on input, so there should be circumstances 
> where throwing an error is a bad thing.

Well, I have nothing against the UA reporting the error, e.g. to a 
developer console, just so long as it doesn't break the form.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list