Tell us what’s happening:
Hi guys, I’m struggling (once more) with one of the exercices needed to pass the tests for the creation of a survey form.
It is the number 9 which demands me to show an HTML 5 error message if numbers are put outside of the number input.
I don’t know what command or element to write.
I would be very grateful for your help.
Your code so far
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.
Challenge: Build a Survey Form
Link to the challenge:
So here’s the exact error message:
If I enter numbers outside the range of the number input, I will see an HTML5 validation error.
Meaning if the user enters something that isn’t allowed, an error will display. It sounds like you need to set a range of acceptable input, right? So, how can you modify this line of your code
label for=“number” id=“number-label”>Age: so that you pass 9?
@Bligidi, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.
The full text of the error message is;
If I enter numbers outside the range of the number input, I will see an HTML5 validation error.'
Minimum number should be defined : expected NaN not to be NaN
AssertionError: Minimum number should be defined : expected NaN not to be NaN
Here you can see the test is telling you what it’s looking and why it’s failing.
Juste made it using min and max, thank you guys !
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.