Having trouble passing The Survey Form/HTML 5 Validation issues

I’m failing four items on the survey form pen and I’m running into trouble in regard to the following items:

• 8. If I enter non-numbers in the number input, I will see an HTML5 validation error.
• 9. If I enter numbers outside the range of the number input, I will see an HTML5 validation error.’

I’m racking my brain to try and figure out where I’m going wrong with these. Here’s my code:

Insert amount of jigawatts used

The question would be:

  1. Do I need any extra code to generate an HTML5 Validation Error for entering a non-number (or outside-the-range numbers) OR do I just need “required” in the code?

Here’s the URL for my pen:

Thanks a lot for any help you can provide.


Can you please link to your Codepen? The link you supplied is just the boilerplate template used for testing.

Here it is

Nope, still the same generic boilerplate. Make sure you save your pen first and then send us the link.

Sorry about that. Here it is.

The id attribute should be unique for the entire document. This means you should only have id=“something” for a single element. See the following section for your duplicate id issue which is causing test #8 and #9 to fail.

I’m having same issue. Not sure if I am doing this right.
Here is my code.


Is the above code the proper code for User Story #8: If I enter non-numbers in the number input, I will see an HTML5 validation error?

The ID needs to be “number” also. However all else it should be ok.

I would go through your code and check the IDs match all of the cases required for the tests.

I find most answers to questions on this forum very vague. I usually end up googling to find a more direct response. This thread is not helpful at all

As this topic is over 2 years old, and might be outdated, I have closed it.

If you find yourself with a question about your own code, feel free to open a new topic.

Thank you.