SURVEY FORM email and number

Hey guys!

I´m having troubles trying to figure it out what´s wrong with my code, making the Survey Form. Could you please give me a hint of what´s going on please?
Here are the problems:

  1. 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’

  2. If I enter non-numbers in the number input, I will see an HTML5 validation error.
    Number field should be HTML5 validated : expected ‘text’ to equal ‘number’

Here´s my code in Code Pen:

Survey Form (codepen.io)

Let me know what I could do!

Carlos

1 Like

Hi @carlitoscampo95

You have type as:

type: <!-- this should be type= -->
1 Like

@carlitoscampo95, the failing message reads;

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'

In your code you have type: "text";
type: is not the valid way to define an attribute

Hope that helps.

1 Like

The link that you gave says the following:

The <input> element is so powerful because of its attributes; the type attribute, described with examples above, being the most important.

So I don’t really understand your point 2, when you say: type is not a valid input attribute.

Poor choice of words on my part. I’ve edited my post.
Thank you…

Sorry, what do you mean?

Sorry if I didn’t explain myself enough, I’m new when it comes to coding.

The two problems that I have are that when I try to run the Test Suite for the Survey Form, I get two errors, which are:

6. If I enter an email that is not formatted correctly, I will see an HTML5 validation error.

7. If I enter non-numbers in the number input, I will see an HTML5 validation error.

Did I explain myself better this time? Please let me know

Thanks for your help guys,
Carlos.

Sorry Roma, but I didn’t understand what you meant,

Could you please explain yourself? Thank you!

Got it now. Thank you!