repat/laravel-validator-nric-fin

Laravel Validator for Singapore NRIC / FIN

0.1 2021-05-10 10:23 UTC

This package is auto-updated.

Last update: 2021-06-10 10:42:51 UTC


README

Latest Version on Packagist Total Downloads

laravel-validator-nric-fin is an custom Rule Object / Validator for Laravel that validates the National Registration Identity Card (NRIC) and Foreign Identification Number (FIN) of Singapore.

Installation

$ composer require repat/laravel-validator-nric-fin

Documentation

use Illuminate\Http\Request;
use Repat\LaravelRules\NricFin;

// ...

public function controllerMethod(Request $request) {
    $request->validate([
        'nric' => new NricFin,
    ]);

    //
}

Tests

vendor/bin/phpunit

License

Version

  • Version 0.1

Contact

repat

Flattr this git repo