Email validation for HTML input is incorrect
Reported by
amarkon...@gmail.com,
Jun 4 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Steps to reproduce the problem:
1. Create an HTML document with exactly one <input type="email"/>
2. Enter an email address with a single-character hostname into the input (`username@a`, for example), which is an invalid hostname according to RFC 952
What is the expected behavior?
`document.querySelector('input').validity.valid` should return `false`, as a single-character hostname is not a valid hostname
What went wrong?
`document.querySelector('input').validity.valid` returns `true`
Did this work before? N/A
Does this work in other browsers? No
Identical in Firefox, have not attempted reproduction in Internet Explorer or Edge
Chrome version: 58.0.3029.110 Channel: stable
OS Version: OS X 10.12.1
Flash Version:
,
Jun 5 2017
Tested the issue on mac os 10.12.5 using chrome M58 #58.0.3029.110 using below steps: 1. Launched chrome and downloaded given html file and opened it in chrome and entered "username@a" in text field. 2. and observed no error message in console Attached screenshot for reference. @amarkon895-- Could you please confirm us if we have missed any steps in reproducing the issue and also please provide us the expected result screenshot. Thanks!
,
Jun 5 2017
,
Jun 6 2017
HTML's email definition is loose. It allows hostnames without "." https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address |
||||
►
Sign in to add a comment |
||||
Comment 1 by nyerramilli@chromium.org
, Jun 5 2017