Skip to content

Indonesian citizenship identification number Validator

License

Notifications You must be signed in to change notification settings

irsyadulibad/nik-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nik-validator

NIK Validator is a package to convert Indonesian citizenship identity number into usefull information. You just call the parse method and input NIK number in the parameter, then you will get the informations (without internet connection).

Usage

  • Installation
composer require irsyadulibad/nik-validator
  • Example
<?php
use Irsyadulibad\NIKValidator\Generator;
use Irsyadulibad\NIKValidator\Validator;

$nik = (new Generator())->generate();
$parsed = Validator::set($nik)->parse();

if($parsed->valid) {
    var_dump($parsed);
}