HTML Survey form project, can't fix errors

Hello, I’m new here :slight_smile:
Can’t understand why is the reason of my mistakes in my survey form project and due to that, can’t fix it. Can you help me please? Hhere is the codepen link to my survey form.

The errors:

4. Inside the form element, I am required to enter my name in a field with id=“name”. If I do not enter a name I will see an HTML5 validation error.

Name input field should be required : expected false to be truthy.
I suppose pattern="[A-za-z\s]{1,32}" that includes 32 capital , letters and and spaces would work.

8. 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’.
I guess my pattern="\d"+ and min, max are wrong*

10. For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=“name-label”, id=“email-label”, and id=“number-label”.

#email-label is not defined : expected null to not equal null.
I put the labels with its respective id, what am I doing wrong?

16. Inside the form element, I am presented with a button with id=“submit” to submit all my inputs.

There should be a button with id=“submit” : expected null to not equal null.
I have put there a submit button!!

I’ll appreciate any other advice.

Carefully read all of the error messages. It is telling you exactly what is missing.

The required attribute missing

Name input field should be required : expected false to be truthy

Incorrect type attribute

Number field should be HTML5 validated : expected ‘text’ to equal ‘number’

Missing ids

#email-label is not defined : expected null to not equal null

There should be a button with id=“submit” : expected null to not equal null

1 Like

Than you. I’m new at this things and I’m not familiarized with reading the error messages carefully, gotta pay much more attention to it.
Now it passed all test.

1 Like