Validate HTML Forms with JavaScript and HTML

von
Coursera Project Network
In diesem angeleitetes Projekt werden Sie:

Explain the importance of verifying the data values entered on a form.

Write JavaScript code that validates values entered on an HTML form.

Demonstrate techniques for validating values entered on a form using HTML built-in validation.

Clock2 hours
IntermediateMittel
CloudKein Download erforderlich
VideoVideo auf geteiltem Bildschirm
Comment DotsEnglisch
LaptopNur Desktop

By the end of this project, you will have written and tested JavaScript and HTML code that validates data values entered into input fields on an HTML form. Data validation is a valuable skill in web development. Notifying users of input errors not only improves the user experience it also helps to ensure that any data collected via a form is as accurate as possible before sending it to a server for processing. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Kompetenzen, die Sie erwerben werden

  • Client-side Form Validation
  • HTML5 Built-in Form Validation
  • Javascript Methods
  • Data Validation
  • JavaScript

Schritt für Schritt lernen

In einem Video, das auf einer Hälfte Ihres Arbeitsbereichs abgespielt wird, führt Sie Ihr Dozent durch diese Schritte:

  1. Compare client- and server-side validation as you investigate when and where to validate data values to reduce data input errors.

  2. Use JavaScript code to check an input field on a form to ensure that it has been filled in and display an error message if the field is empty.

  3. Use JavaScript to test the value entered into a form field to determine its length and/or whether it falls within a range of numeric values and display an error message if that is not the case.

  4. Test the value entered into a form to ensure that it matches an email address format and display an error message if it does not.

  5. Modify HTML code to include built in form validation to check for a range of numbers, a list of values and the correct format for an email address.

Ablauf angeleiteter Projekte

Ihr Arbeitsbereich ist ein Cloud-Desktop direkt in Ihrem Browser, kein Download erforderlich

Ihr Dozent leitet Sie in einem Video mit geteiltem Bildschirm Schritt für Schritt an.

Häufig gestellte Fragen

Häufig gestellte Fragen

Haben Sie weitere Fragen? Besuchen Sie das Learner Help Center.