I'm thinking of using the input type="email"
to me new site but I have question if would you prefer to use input type text then Check the value by regular expression or use this HTML 5 Email
E-mail: <input type="email" name="usremail" />
Does the HTML input type Email have issue when used(browser or usage)?
The browser won't do any validation if it doesn't support it. You can use modernizr to detect whether or not it does, and act accordingly. (Like use native HTML5 validation, or instead use something like jQuery validation )
According to http://dev.w3.org/html5/markup/input.email.html, the input email uses this regex to verify it is an email:
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
You should be validating these things server side as well anyway.
You can use html5 email to validate but it only checks for XXXX@XXXX so that's a valid email lol
for me at least I would say just use jquery validate and always to server side validation
it won't hurt to use the email type as browsers that don't support it will convert to text type
you may want to look at modernizr for backward compatiblility
HTML5 - as you know - is not fully supported by the available browsers , this input type='email'
is supported by Chrome , FF , but not supported by IE old versions .. There's a work around solution : you can stay using these HTML5 inputs , and use this JS library to support the other broswers : http://code.google.com/p/webforms2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With