Problems with survey page project 2

i am having issues figuring out how to create a html error when the email is in correct. very frustrating.

here is the link to my codepen
https://codepen.io/james978/pen/ZEpzeVG

Hi @jmorse978!

When you click on the red button 6/17 it will tell you what the error is.
Do you understand the error message?

The problem is here

 <input type="text" id="email"

I tell people to read more than just the first line of the failing test message.
In this case the failing message says;

If I enter an email that is not formatted correctly, I will see an HTML5 validation error.  
Email field should be HTML5 validated : expected 'text' to equal 'email'  
AssertionError: Email field should be HTML5 validated : expected 'text' to equal 'email'

The second (and third) line tells you what the test expects to see versus what it is finding.

Hope that helps.

1 Like

i understand it as, "create a error message when email is incorrecty sumbitted. " but i dont know how to do that im looking back through the curriculum and cant sort it.

I also had more code but i guess i saved the wrong tab at the end of the day

I don’t think there is this specific case with an input for an email in the curriculum, but there is how to make an html validation error - you need to explore a tiny bit outside the curriculum and/or interpret the error message correctly

Basically yes, although you are not creating the error message. When you code it correctly, if the user inputs an email addr that is not correct an HTML5 error will be thrown.

The part of the error message you should focus on is;
expected 'text' to equal 'email'
If interpreted correctly that should give you the answer. Otherwise, as ieahleen said, you may have to do some external searching.

hey guys. I decided to revisit project two after the holiday.

https://codepen.io/james978/pen/gOwbwyX

I am having trouble requiring an email format versus any text being accepted.

thank you for that… believe this is now how it should have been…

https://codepen.io/james978/pen/gOwbwyX

1 Like

@jmorse978, I don’t recall your original code but what’s here looks like a lot was taken from the sample project.

Make the project from scratch, with your own code, style and content. Don’t take code from the sample project.

  • The projects aren’t just another challenge. Each one is meant to be a significant step in your progress. Every project you do will require research, planning, trial and error, and strengthening your skills beyond what you gain from the incremental challenges.
1 Like