On 12/05/2012 10:31, Benjamin Hawkes-Lewis wrote:
On Sat, May 12, 2012 at 9:54 AM, coder<[email protected]> wrote:<input name="email" id="email" placeholder="Enter your Email Address" pattern="^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$" required type="email">Note that's not a safe regex to validate email addresses. It will exclude legitimate addresses like [email protected]. I suggest just keeping it simple and checking for ^.*@.*$.
Or not using pattern/regexp at all and relying on the fact that browsers that support type=email should automagically do internal validation of the input against their baked-in pattern.
P -- Patrick H. Lauke ______________________________________________________________ re·dux (adj.): brought back; returned. used postpositively [latin : re-, re- + dux, leader; see duke.] www.splintered.co.uk | www.photographia.co.uk http://redux.deviantart.com | http://flickr.com/photos/redux/ ______________________________________________________________ twitter: @patrick_h_lauke | skype: patrick_h_lauke ______________________________________________________________ ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [email protected] *******************************************************************
