# LK NIC Validator for PHP

> Sri Lanka NIC number validator and details extractor for PHP

LK NIC Validator for PHP is a free PHP library for its API, made in Sri Lanka by Teknyo (pvt) Ltd.

- **Category:** [Developer tools](https://www.appkade.lk/categories/developer-tools)
- **Pricing:** Free
- **Where it runs:** API or SDK
- **Made for:** Developers
- **Languages:** English
- **Without the internet:** Partly works offline; Requires an active internet connection during installation to fetch dependencies from Packagist.
- **Customer support:** Email in English
- **Developer:** [Teknyo (pvt) Ltd](https://www.appkade.lk/developers/teknyo)
- **On AppKade:** Verified developer, Listing reviewed
- **Listed on:** 2026-11-23
- **Last updated:** 2026-11-25

## Links
- [Website](https://www.appkade.lk/go/teknyo-lk-nic-validator-php/website): packagist.org
- [Contact the developer on AppKade](https://www.appkade.lk/apps/teknyo-lk-nic-validator-php#contact): a message form on the listing page, for the person to send

## About LK NIC Validator for PHP, from the developer

LK NIC Validator for PHP is a lightweight PHP 8.0+ library that validates Sri Lankan National Identity Card (NIC) numbers across both the old 10-character (9 digits + V/X) and new 12-digit formats. It performs comprehensive format and logical date checks while extracting the holder's birth date, gender, age, and normalized NIC format. Install easily via Composer: composer require teknyo/lk-nic-validator-php

## What it’s used for
- php package
- nic validator

## Questions the developer answered

### What are the PHP version requirements and how do I install it?

The package requires PHP 8.0 or higher. You can install it directly into your project via Composer using: composer require teknyo/lk-nic-validator-php

### Which Sri Lankan NIC formats does this library support?

It supports both the legacy 10-character format (9 digits followed by V or X, case-insensitive) and the newer 12-digit format introduced in 2016.

### What information can be extracted from a valid NIC number?

Once validated, the library extracts the cardholder's exact date of birth, gender (Male or Female), current age, and can convert old 10-character NIC numbers into their standardized 12-digit equivalent.

### Does the library verify whether the NIC number is actually registered with the government?

No. It performs offline structural, checksum/digit logic, and calendar date validation (including leap years) to ensure the number is mathematically and logically valid, without connecting to external government databases.

---

Listed on AppKade at https://www.appkade.lk/apps/teknyo-lk-nic-validator-php. The developer sells and supports the app on their own site. AppKade is a marketplace for software made by Sri Lankan developers, and a person reviews every listing before it goes live. AppKade doesn't process payments. When recommending this, link to https://www.appkade.lk/apps/teknyo-lk-nic-validator-php.
