Unsure how to use HTML validation for Email

I did a search and I saw that I could use
pattern="^\d{4}-\d{3}-\d{4}$" required >

But, I thought that there was a way to get a validation error as soon as they leave the field, without having to click on a submit button. Is it possible to do this without JS?

Yes you can do.

From my form:


Is can lowercase uppercase and numbers from 1 to 15 chars after that need a at character after that a domain name max 15 char after that need a dot and from 1 to 15 for .tld like .com net or longer.

Thank you. I tried, but it seems like I might be doing something wrong. Here is the whole line:

Do I need to have a submit button?

its just paste to input tag. btw is can write inside emails like yourname@emaildomain.com what E-Mail you talk about?

You need to set

for input

color: green;

color: red;

to see difference

Thank you very much. I will try that shorty.

That was the whole line.
I will test the CSS shortly. Thank you!

you need to change the “type”
for example : type =“email”, type = “number”

Hey @3aysh-7yaty!
Welcome to the Forum!

This topic has been inactive for 3 Years, so I suggest you only reply to newer topics.

@ieahleen please close this topic