PHP code example of repat / laravel-validator-nric-fin

1. Go to this page and download the library: Download repat/laravel-validator-nric-fin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

repat / laravel-validator-nric-fin example snippets



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

// ...

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

    //
}