Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephenombuya/telephone-number-validator
A simple web application to validate U.S. telephone numbers, allowing a variety of standard formats. Built with HTML, CSS, and JavaScript, this project provides real-time validation for U.S. phone numbers, checking formats and ensuring the correct country code if specified.
https://github.com/stephenombuya/telephone-number-validator
css3 html5 javascript regular-expressions
Last synced: about 1 month ago
JSON representation
A simple web application to validate U.S. telephone numbers, allowing a variety of standard formats. Built with HTML, CSS, and JavaScript, this project provides real-time validation for U.S. phone numbers, checking formats and ensuring the correct country code if specified.
- Host: GitHub
- URL: https://github.com/stephenombuya/telephone-number-validator
- Owner: stephenombuya
- License: gpl-3.0
- Created: 2024-11-06T17:07:13.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T17:17:10.000Z (about 2 months ago)
- Last Synced: 2024-11-06T18:25:48.709Z (about 2 months ago)
- Topics: css3, html5, javascript, regular-expressions
- Language: CSS
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Telephone Number Validator**
A simple web application to validate U.S. telephone numbers, allowing a variety of standard formats. Built with HTML, CSS, and JavaScript, this project provides real-time validation for U.S. phone numbers, checking formats and ensuring the correct country code if specified.### **Table of Contents**
- Features
- Technologies Used
- Setup
- Usage
- Project Structure
- License### **Features**
- Validates multiple U.S. phone number formats
- Alerts user when no input is provided
- Clears validation results on button click
- Styles for valid and invalid phone numbers
- User-friendly interface with input, button, and results display### **Technologies Used**
- **HTML5**: Structure of the web app.
- **CSS3**: Styling the layout and feedback messages.
- **JavaScript**: Logic to validate phone numbers and handle button actions.
- **Regular Expressions (RegEx)**: Pattern matching for U.S. phone number formats.### **Setup**
1. Clone the repository:
```
git clone https://github.com/stephenombuya/Telephone-Number-Validator/tree/main
```2. Navigate into the project directory:
```
cd telephone-number-validator
```3. Open index.html in your preferred browser:
```
open index.html
```- Or use a live server to view the application locally.
### **Usage**
- **Enter a phone number**: Type any U.S. phone number format into the input field.
- **Validate**: Click the Check button to validate the entered number.
- **Clear**: Click the Clear button to reset the input field and results.### **Project Structure**
```
telephone-number-validator/
│
├── index.html # Main HTML file
├── style.css # Main CSS file
├── script.js # JavaScript validation logic
└── README.md # Project documentation
```### **License**
This project is licensed under the GNU GPL License. See the [LICENSE](https://github.com/stephenombuya/Telephone-Number-Validator/blob/main/LICENSE) file for details.