FCC survey form , number validation

how to number validation using html 5

read che error message in the test suite, it may help you get it

1 Like

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”.

not understood could anybody explain in simple way please.

@gunjan15697, 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.

You’ve only read the first line. The failing message says

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".
#name-label should be a <label> element : expected 'LABLE' to equal 'LABEL'
AssertionError: #name-label should be a <label> element : expected 'LABLE' to equal 'LABEL'

On a side note,

  1. </input> is not valid HTML5. The input element is self closing
  2. All your styling should be external. Do not use in-line styling. Everything between the style tags should be in codepen’s CSS editor. Get rid of the style tags.
  3. Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in the HTML editor. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.