Skip to content

codeitamarjr/IE-PPSN-Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PPSN Validator

Latest GitHub Action Latest Release

Overview

The PPSN Validator is a simple web application designed to validate Irish Personal Public Service Numbers (PPSNs). The validator checks if a PPSN is correctly formatted and calculates the check digit to ensure its validity. This tool is useful for anyone who needs to verify PPSNs, whether for personal use or as part of a larger software system.

PPSN Validator Screenshot

Features

  • Real-time Validation: As users enter their PPSN, the tool checks for the correct format and validates the check digit.
  • Responsive Design: The application is designed to be mobile-friendly, ensuring a seamless experience across devices.
  • User-Friendly Interface: The validator features a clean and intuitive interface, making it easy to use for everyone.

Demo

You can see the PPSN Validator in action here.

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/codeitamarjr/IE-PPSN-Validator.git
  2. Navigate to the project directory:

    cd ppsn-validator
  3. Open the index.html file in your web browser:

    open index.html

    Alternatively, you can use a local server to serve the file. For example, using Python's built-in HTTP server:

    python3 -m http.server

    Then navigate to http://localhost:8000 in your web browser.

Usage

To validate a PPSN:

Enter the PPSN into the input field. Click the "Validate" button. The tool will alert you whether the PPSN is valid or invalid based on the format and check digit calculation.

How It Works

The validator performs the following checks:

Format Check: Ensures the PPSN is in the correct format, consisting of 7 digits followed by 1 or 2 letters. Check Digit Calculation: Calculates the expected check character using a weighted sum of the digits and a modulus 23 calculation. Second Character Validation: If a second character exists, it checks that it is one of the allowed characters (A, B, W, X, T, Z). The application uses JavaScript to perform these validations in real-time.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contact

For any questions, feedback, or collaboration inquiries, please feel free to reach out to the project maintainer:

Acknowledgements

Support

If you find this tool useful, please consider giving the repository a star ⭐ on GitHub. Your support is greatly appreciated!

About

Irish PPS Number Validator

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages