Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adambullmer/usdlregex

US Driver's License Regex
https://github.com/adambullmer/usdlregex

drivers-license php regex

Last synced: 7 days ago
JSON representation

US Driver's License Regex

Awesome Lists containing this project

README

        

US Driver's License Regex Repository
====================================

[![codecov](https://codecov.io/gh/adambullmer/USDLRegex/branch/master/graph/badge.svg)](https://codecov.io/gh/adambullmer/USDLRegex)

Sourced from https://ntsi.com/drivers-license-format/
Known to be valid as of 2016-04-16.

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

Install with composer: `composer require adambullmer/usdl-regex`

Usage
-----

```php
$options = array(
'verbose' => FALSE,
'caseInsensitive' => FALSE,
);
$validator = new USDLRegex/Validator($options);

$validator->validate('TX', '12345678'); // TRUE
$validator->validate('TX', '123456789'); // FALSE
```