Skip to content

Jagjeet-Dhuna/JavaScript-FormValidation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Form Validation Exercise

This project demonstrates how to perform form validation using JavaScript. It includes an HTML form with various input fields such as text, email, password, and checkboxes, along with corresponding validation rules.

Note the screen capture was recorded in 2440x1440

Live preview: https://jagjeet-dhuna.github.io/JavaScript-FormValidation/

Features

  • Validates the form inputs in real-time as the user interacts with the form.
  • Provides immediate feedback to the user by highlighting invalid fields and displaying error messages.
  • Implements validation rules for different types of fields, including required fields, email format, password strength, and checkbox selection.
  • Utilizes JavaScript to handle form submission, preventing it if any of the fields are invalid.
  • Separates the presentation logic from the validation logic by using CSS to style the form and error messages.

Usage

  1. Clone or download the project repository.
  2. Open the index.html file in a web browser.
  3. Fill in the form fields and observe the validation in action.
  4. Try submitting the form with invalid input to see the error messages.

Project Structure

  • index.html: The HTML file containing the form structure and input fields.
  • styles.css: The CSS file that defines the styles for the form and error messages.
  • script.js: The JavaScript file responsible for implementing the form validation logic.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published