Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Default Pattern Library needs to include the HTML5 standard patterns for email and URL #1

Open
ericelliott opened this issue Oct 15, 2010 · 9 comments

Comments

@ericelliott
Copy link
Owner

There are good email and url patterns in my checked out branch right now, but the HTML5 form specification mentions specific patterns for email and URL that must be implemented in order for the feature to be compliant.

@ericelliott
Copy link
Owner Author

I looked for the patterns in the spec last night and couldn't find them. Anybody know where they are located?

@danielmahal
Copy link

Doesn't it sayhere?
http://www.w3.org/TR/2010/WD-html-markup-20101019/datatypes.html#form.data.emailaddress-def

Any string that matches the following [ABNF] production:
1_( atext / "." ) "@" ldh-str 1_( "." ldh-str )

This should be transferrable to a regexp pattern right?

@ericelliott
Copy link
Owner Author

Thanks, Daniel - That's exactly what I was looking for. Will replace my placeholder patterns with all of these. Just forgot where to find them! =)

@drublic
Copy link

drublic commented Jan 24, 2011

Short question on this one:
It seems like inputs of type email are not validated with the plugin. Will this be added soon or do I make a mistake?

@ericelliott
Copy link
Owner Author

drublic - h5Validate doesn't yet automatically validate the new HTML5 input types with appropriate patterns. The reason for that is that I want to be careful to use the specification standards for consistency. That is on the roadmap for 1.0.

That said, there is an email pattern in the pattern library. You can use it simply by attaching a class to your element (see the "pattern library" section here: http://ericleads.com/h5validate/ ).

There is a known bug right now: the validation is case sensitive. It is scheduled to be fixed within the next couple weeks (possibly much sooner).

@drublic
Copy link

drublic commented Jan 26, 2011

Hi dilvie,
thanks for your response. I figured out how to do it :) Pretty cool…

@ericelliott
Copy link
Owner Author

That case-sensitivity bug is fixed, by the way. =)

@AxelWinter
Copy link

the standard pattern are buggy, because they accept [email protected] (one Letter TLD) and TLDs ending with a . (dot)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants