: Input type="email" allows test@test, why? I've always been under the assumption that the browser email-validation-regex is more robust than some regex pattern in JS/PHP. My employer just showed
I've always been under the assumption that the browser email-validation-regex is more robust than some regex pattern in JS/PHP.
My employer just showed me that both strings are considered correct (at last in FF28):
test@test.com // Expected to be true, is true
test@test // Expected to be false, is true
Why is the latter true? Is this a bug, or something for the future? Because as far as I can tell, it's not correct to not use a extention (apart from maybe localhosts).
Anyone who can shed some light on this?
More posts by @Courtney195
3 Comments
Sorted by latest first Latest Oldest Best
Note also that web browsers are not required to perform any validation checks. Older browsers don't do anything special with the email address. Newer browsers may validate, but the 'email' type is most useful on mobile devices where a specialized keyboard may be shown to the user.
You could edit your hosts file or run a DNS server on a local network to create a machine with a top level domain name. The email address will be only accessible if it's routed only within that local network but it's a possible configuration.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.