2

I recently had to exemplify a list of e-mail addresses which I did by double quoting the original address and append @example.com.

For example

foo@bar.baz

I converted to

"foo@bar.baz"@example.com

To my big surprise I found that the resulting e-mail address validates as invalid in the HTML5 input=email field validation, i.e.

<input name='foo' type='email' required='required' />

Does this not make the build in HTML5 validation of e-mail addresses completely useless as it block potential valid e-mail addresses, or am I missing something here?

Muleskinner
  • 14,150
  • 19
  • 58
  • 79
  • You can [provide a `pattern`](http://stackoverflow.com/q/19605773/11683) that [suits you](http://stackoverflow.com/a/27000682/11683). – GSerg Aug 17 '15 at 08:45

1 Answers1

1

HTML5 In Built email validation provides very basic validation. If you want to cover each and every scenario consider using a library or handle using regex.

atinder
  • 2,080
  • 13
  • 15
  • But a "basic validation" should not mark valid input as invalid IMHO. A basic validation would be to test for "@" for example. – Muleskinner Aug 17 '15 at 08:42