makowskid/sg-nric

Package to easily validate Singapore NRIC/FIN numbers in PHP

v1.0.0 2023-12-01 05:18 UTC

This package is auto-updated.

Last update: 2024-10-30 01:59:52 UTC


README

PHP Singapore NRIC (National Registration Identity Card) or FIN (Foreign Identification Number) validator package

Software License Total Downloads

Install

composer require makowskid/sg-nric

Usage

use Makowskid\SgNric\SgNric;

$validator = new SgNric();

if ($validator->isNricValid($theNric)) {
    // NRIC is valid
    // Your code here...
}

// OR

if ($validator->isFinValid($theFin)) {
    // FIN is valid
    // Your code here...
}

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.