Skip to content

A compact, hands-on project demonstrating core programming concepts and practical solutions. Ideal for learning, experimenting, and showcasing coding proficiency in a focused environment.

Notifications You must be signed in to change notification settings

nitheshgowda10/mini-project2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📝 Form Handling & Validation using JavaScript

This is a mini project built for learning Module 7: Form Handling and Validation in JavaScript.
It shows how to create a simple signup form and validate user input before submitting.


📌 Features

  • ✅ Required fields validation (Username, Email, Password)
  • ✅ Email format check (must contain @ and domain)
  • ✅ Password length check (minimum 6 characters)
  • ✅ Real-time validation (feedback while typing)
  • ✅ Success message on valid submission
  • ✅ Advanced example with Confirm Password + Success Popup Modal

🛠 Tools Required

  • Editor: Visual Studio Code (or any text editor)
  • Browser: Google Chrome, Firefox, or Edge

No extra installations are required — just open the HTML file in a browser.


📂 Project Structure

form-validation-project/ │ ├── index.html # Basic version (Username, Email, Password) ├── script.js # JavaScript for form validation │ ├── index-advanced.html # Advanced version with Confirm Password + Popup │ └── README.md # Project documentation

yaml Copy code


🚀 How to Run

  1. Download or clone this repo:
    git clone https://github.com/YourUsername/form-validation-project.git

Open the project folder.

Double-click index.html to open in your browser. (Optional: use VS Code Live Server for auto reload.)

Try filling out the form and testing different cases.

🧪 Testing the Form Case 1 — Empty Fields Submit without entering anything.

Errors:

Username is required

Email is required

Password is required

Case 2 — Invalid Email Enter user@ in email.

Error: Please enter a valid email.

Case 3 — Short Password Enter 123 as password.

Error: Password must be at least 6 characters.

Case 4 — Success Username: Alice

Email: [email protected]

Password: secure123

✅ Success message appears.

Advanced Version Includes Confirm Password field.

If passwords don’t match → error: Passwords do not match.

On success → shows a 🎉 popup modal.

📖 What I Learned How to create forms in HTML.

How to use JavaScript to validate input.

How to give real-time feedback with event listeners.

How to show success/error messages in the UI.

How to build a simple modal popup in pure JavaScript.

📸 Screenshots (optional) Add screenshots here if you want to show examples.

📜 License This project is for learning purposes only. You are free to use and modify it.

yaml Copy code


👉 This README is ready-to-use for GitHub.
Do you also want me to write a short LinkedIn post description (like you did for the other projects) so you can share this mini project as a learning milestone?

Ask ChatGPT

About

A compact, hands-on project demonstrating core programming concepts and practical solutions. Ideal for learning, experimenting, and showcasing coding proficiency in a focused environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published