PHPackages                             phyozawtun/composer-myanmar-national-registration-nrc-card - 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. phyozawtun/composer-myanmar-national-registration-nrc-card

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

phyozawtun/composer-myanmar-national-registration-nrc-card
==========================================================

PHP Composer Package - Myanmar National Registration Card. in from NRC card. General purpose library for Myanmar NRC Card. Get list of townships code used in NRC number format, validation NRC number inputs and intigrated in forms.

v1.2(5y ago)3151AGPL-3.0-or-laterPHP

Since Apr 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/phyozawtun/composer-myanmar-national-registration-nrc-card)[ Packagist](https://packagist.org/packages/phyozawtun/composer-myanmar-national-registration-nrc-card)[ RSS](/packages/phyozawtun-composer-myanmar-national-registration-nrc-card/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (7)Used By (0)

README.md
=========

[](#readmemd)

PHP Composer Package - Myanmar National Registration Card. in from NRC card. General purpose library for Myanmar NRC Card. Get list of townships code used in NRC number format, validation NRC number inputs and intigrated in forms. For full documentation pleser refer to DOCUMENTATION.md

- Special Thanks
- Installation
- Roadmap
- Contribution
- Usage

Special Thanks
--------------

[](#special-thanks)

Htet Oo Zin / Myanmar NRC

Installation
------------

[](#installation)

```
composer install

```

Roadmap
-------

[](#roadmap)

- VanillaJS Library Myanmar National Registration Card
- JavaScript, Node.js Package

I am planning to release next two news release. Please join and congribute in this repository.

Contributing
------------

[](#contributing)

Interested in contributing to Architect? I would love your help. PHP Composer Package - Myanmar National Registration Card is an open source project, built one contribution at a time by users like you.

Usage
-----

[](#usage)

### getNRC

[](#getnrc)

**Example #1 Get all states and states' disticts short codes**

```

```

The above example will output:

```
array(2) {
  [0]=>
  array(9) {
    [0]=>
    array(4) {
      ["distict_id"]=>
      string(2) "24"
      ["township_en"]=>
      string(7) "BaLaKha"
      ["township_mm"]=>
      string(33) "(ဘလခ) ဘော်လခဲ"
      ["state_id"]=>
      string(1) "2"
    }
	...

```

**Example #2 Filter single or multiple states and states' disticts short codes**

```

```

isNRC
=====

[](#isnrc)

**Example #1 Simple vaid and invalid examples**

```

```

The above example will output:

```
true
false

```

**Example #2 Commoon invalid examples comparing with valid examples**

```
// Simple check with English Charaictes
$is_valid = isNRC("12","BaTaHta","010203");
var_dump($is_valid);

// Simple check with English Charaictes
$is_valid = isNRC("12","LaMaNa","010203","en");
var_dump($is_valid);

// Mixup Myannar and English numeric charaictes check
$is_valid = isNRC("12","ဗတထ","010203","mm");
var_dump($is_valid);

// Can mixup Myannar and English numeric charaictes
$is_valid = isNRC("12","BaTaHta",'၀၁၀၂၀၃','any');
var_dump($is_valid);

// Can mixup Myanamr and English charaictes for numeric string where lang is en or mm
$is_valid = isNRC("12","လမန",'၀၁၀၂၀၃',"mm");
var_dump($is_valid);

// Defined language and input must be relevent
$lang = "en";
$is_valid = isNRC($state_id,$distict,$reg_no,$lang);
var_dump($is_valid);

// Township codes and state_id must be relative
$is_valid = isNRC("6","BaTaHta",010203);
var_dump($is_valid);

// Reg no mush be 6 digit
$is_valid = isNRC("6","BaTaHta",001002003);
var_dump($is_valid);

```

The above example will output:

```
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)

```

**Notes**

> Note: More examples available in **`repository/examples/`** directory. These examples also available on **web demo**.

> Note: For full documentation pleser refer to DOCUMENTATION.md

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

1914d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92432637178ada5ac56f4cbd6287df649ec2be243d46a4f69e900d65b28bd291?d=identicon)[phyozawtun](/maintainers/phyozawtun)

---

Tags

myanmarmyanmar-languagemyanmar-national-registrationmyanmar-toolsmyanmar-unicodenational-registry-numbernrc-card

### Embed Badge

![Health badge](/badges/phyozawtun-composer-myanmar-national-registration-nrc-card/health.svg)

```
[![Health](https://phpackages.com/badges/phyozawtun-composer-myanmar-national-registration-nrc-card/health.svg)](https://phpackages.com/packages/phyozawtun-composer-myanmar-national-registration-nrc-card)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
