Skip to content

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ž Telephone Number Validator

A JavaScript project built for the FreeCodeCamp JavaScript Algorithms and Data Structures Certification. This validator checks whether a given string is a valid US telephone number based on the projectโ€™s required test cases.

๐Ÿง  What This Project Does

Validates US phone numbers using JavaScript

  • Supports multiple valid formats (parentheses, spaces, hyphens, etc.)

  • Rejects invalid or incorrectly formatted numbers

-Passes all FreeCodeCamp test requirements for the Telephone Number Validator project

๐Ÿ› ๏ธ Tech Used

  • JavaScript

  • Basic DOM interaction

  • Logic-based pattern checking

๐Ÿ“‚ Files in This Repo

  • script.js โ€” main validation logic

  • README.md โ€” project documentation

  • LICENSE โ€” MIT License

๐ŸŽฏ Purpose of This Project

This project helped me practice:

  • Writing clean, testโ€‘driven JavaScript

  • Understanding string validation and pattern logic

  • Solving algorithmic problems without relying on regex

  • Strengthening problemโ€‘solving skills for realโ€‘world input validation

๐Ÿš€ Future Improvements (Optional)

  • Add a simple UI to test numbers in the browser

  • Add regex version vs. logicโ€‘based version

  • Add unit tests using Jest

๐Ÿ“œ License

This project is licensed under the MIT License

About

A simple JavaScript telephone number validator built for the FreeCodeCamp curriculum. It checks multiple valid U.S. formats and returns whether the input is a valid phone number.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages