1

I have an email input field.
I have css rules for :valid and :invalid states.
Why does "some@mail" make this field valid?
Why it's not waiting for ".com"?
Is there any way to make it behave normally?

Previously, I used JS for these purposes. Today I'd like to resolve this without JS

1 Answer 1

2

some@mail is a valid email address. mail here could be a local URL with no top-level domain associated with it.

For instance, at my office we have http://wiki/ set up to take us to our company wiki. If we wanted to we could set up an email server on this with the URL example@wiki - there'd be no .com because there is no TLD here at all.

Wikipedia has a pretty good list of valid email address examples, where they include the following example in this format:

  • admin@mailserver1 (local domain name with no TLD)
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.