PHPackages                             pnm1231/nic-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. pnm1231/nic-parser

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

pnm1231/nic-parser
==================

Sri Lankan national identity card number validator

v1.2.2(2y ago)047MITPHP

Since Jan 6Pushed 2y agoCompare

[ Source](https://github.com/pnm1231/NICParser)[ Packagist](https://packagist.org/packages/pnm1231/nic-parser)[ RSS](/packages/pnm1231-nic-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Sri Lankan National Identity Card Number Parser
===============================================

[](#sri-lankan-national-identity-card-number-parser)

A PHP library to parse, validate, and generate valid Sri Lankan national identity card numbers.

[![Latest Stable Version](https://camo.githubusercontent.com/08dda6a14c838f8260fcefad574c6d9bbc2782d3acfe1a4851b9ba625d950e68/687474703a2f2f706f7365722e707567782e6f72672f706e6d313233312f6e69632d7061727365722f76)](https://packagist.org/packages/pnm1231/nic-parser)[![Total Downloads](https://camo.githubusercontent.com/47c656df23f8d13ecd8ae9242e105badad1a0d49b55e8bdb536a4729907eb21b/687474703a2f2f706f7365722e707567782e6f72672f706e6d313233312f6e69632d7061727365722f646f776e6c6f616473)](https://packagist.org/packages/pnm1231/nic-parser)[![Latest Unstable Version](https://camo.githubusercontent.com/591fe903e065d003809f38054732c97c5be9682989dea8ab2f42e5c6a0f6079d/687474703a2f2f706f7365722e707567782e6f72672f706e6d313233312f6e69632d7061727365722f762f756e737461626c65)](https://packagist.org/packages/pnm1231/nic-parser)[![License](https://camo.githubusercontent.com/b1f12af22b0f6d39c35ad401b7d1055c985d340c86f84378d5d1c239babde71b/687474703a2f2f706f7365722e707567782e6f72672f706e6d313233312f6e69632d7061727365722f6c6963656e7365)](https://packagist.org/packages/pnm1231/nic-parser)[![PHP Version Require](https://camo.githubusercontent.com/76d468dbb9608bead7014873773cfc2c4b7f90d923e87f04452a10d536d4715f/687474703a2f2f706f7365722e707567782e6f72672f706e6d313233312f6e69632d7061727365722f726571756972652f706870)](https://packagist.org/packages/pnm1231/nic-parser)

### Installation

[](#installation)

You can install the library easily with composer. Requires PHP 7.4 or later.

` composer require pnm1231/nic-parser`

Alternatively, you can download the library from GitHub, and manually include the class or integrate into your own autoloader. See the included `composer.json` file for `PSR-4` namespace mappings.

### Usage

[](#usage)

See the [Wikipedia article](https://en.wikipedia.org/wiki/National_identity_card_%28Sri_Lanka%29) for the formats used.

#### Parsing an ID number

[](#parsing-an-id-number)

```
