Skip to content

srinjoywork/Module-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yellow and Orange Rectangles Modern Business Retractable Exhibition Banner

Module-2 Capsitech Training (Validated Form Using Javascript)

Features

  • Real-time validation: Displays error messages for invalid inputs.
  • Prevents spam: Ensures only valid input formats are accepted.
  • Required fields: All form fields must be filled out before submission.
  • File upload validation: CV upload is restricted to .pdf, .doc, or .docx formats.
  • Terms agreement: Users must accept terms before submission.

Validation Rules

  • Full Name: Must contain only letters and spaces.
  • Email Address: Must be a valid email format.
  • Phone Number: Must be exactly 10 digits.
  • Date of Birth: Must be selected.
  • Gender: Must be selected.
  • City, State, Country, Address: Must be filled out.
  • Message: Cannot be empty.
  • Counseling Option: Must select "Yes" or "No".
  • CV Upload: Only accepts .pdf, .doc, or .docx files.
  • Terms Agreement: Must be checked before submission.

Live Demo

You can check out the live version of the project here: Live Link

Figma Link

Figma link of the project : Figma link

Usage

  1. Fill out all required fields in the form.
  2. Ensure inputs match validation rules.
  3. Click the Submit button.
  4. If any input is incorrect, an error message will be displayed.
  5. If all inputs are correct, the form will be successfully submitted.

Technologies Used

  • HTML
  • CSS (Tailwind CSS classes for styling)
  • JavaScript (for validation)

File Structure

  • index.html - Main form structure
  • script.js - JavaScript validation logic

How to Run

Simply open index.html in a browser. Ensure script.js is properly linked for validation to work.

Author

This form was created with user experience and security in mind to prevent spam and ensure accurate data collection.

Releases

No releases published

Packages

No packages published