i notice the builtin email validation does not behave as i thought it should be for example
according to my humble knowledge the email should be somthing@something.something but i notice that if i just write something@something it still say that it valid
i know i can use pattern or js and i should not relay on default validation cause there many way the user can trick the page but why it act like that for the simplest check
Adding the pattern match also triggers an error if the email is invalid.
I found this paragraph which was also notable:
The input value is automatically validated to ensure that it’s either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted. The :valid and :invalid CSS pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not.
The pseudo classes are added by default and the pattern is your choice. Browsers that don’t support these selectors will fall back to a text input. Pro tip: this is where js comes in handy
You’re doing a great job! Let me know if you need anything else
that help but my question was about why the default validator just check for something@something not something@something.something
for example just@someone is considered valid email while it’s not as we all know that email require domain which include .com or .net or anything like that
For me, it works and accepts the submission if the email pattern matches. It directs to a page that doesn’t exist so it returns a 404. The submission, however, completes. I’m using a .com TLD but it will work if you change the pattern.
@justsomeone it is possible to have a valid email address that doesn’t have a TLD, just not very common. The default email validation pattern allows for this.