@vivekrajput-93
Posted
Hey Steve..Do you mind If I ask that do we have to just validate the email...I am little confused with the given instruction ...
@peanutbutterjlly
Posted
hey @vivekrajput-93,
according to the challenge docs (should have these "error states"-The input field is empty -The email address is not formatted correctly
) we should check that they can't submit an empty form/field and that it's formatted correctly as well - I'm guessing have an @
and a proper domain as well.
luckily, html already has email validation baked in - so you won't have to write custom JavaScript validation (you can if you want to of course).
you can also use browser APIs that have validation methods built in already to do the heavy lifting for you (again, you can write them yourself if you wish):
cheers and good luck!