# polish-id-card-validate

> Polish personal ID card validator.

Latest version **1.0.1** (published 2017-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install polish-id-card-validate
pnpm add polish-id-card-validate
yarn add polish-id-card-validate
bun add polish-id-card-validate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-22 |
| First published | 2017-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tomasz Sochacki |
| Maintainers | tomek-sochacki |

## Links

- npm: https://www.npmjs.com/package/polish-id-card-validate
- Repository: https://github.com/drogimex/polish-id-card-validate
- Homepage: https://github.com/drogimex/polish-id-card-validate#readme
- Issues: https://github.com/drogimex/polish-id-card-validate/issues
- npm.io page: https://npm.io/package/polish-id-card-validate

## Dependencies (2)

- [jest](https://npm.io/package/jest.md) ^22.0.3
- [eslint](https://npm.io/package/eslint.md) ^4.13.1

## Recent versions

- 1.0.1 (latest) — 2017-12-22
- 1.0.0 — 2017-12-22

## README

# Simple polish ID card number validator

[![Build Status][travis-image]][travis-url]
[![License][license-image]][license-url]
[![NPM Version][npm-version]][npm-url]
[![Downloads][downloads-image]][npm-url]

Currently polish ID card numbers contains of three letters and six digits. Valid numbers are written in format "XXX NNNNNN", where "X" is a letter and "X" is a digit. The space character is optional.

The control digit is first digit, after letters. For example in number: "ABS 123456" control digit equal "1".

In algorithm of control digit validation letters are presented as numbers, where "A" equal "10" and "Z" qeual "35". In polish ID card are allowed only latin letters.

**Using validator:**

First steep - instalation from NPM:

```javascript
npm install polish-id-card-validate
```

Using validator in the application code:

```javascript
const validate = require( 'polish-id-card-validate' );

validate( 'ABS123456' ); //true
validate( 'abs123456' ); //true

validate( 'ABS 123456' ); //true
validate( 'abs 123456' ); //true

validate( 'ABS523456' ); //false, invalid control digit!
```

*Validator can be use only for new ID card numbers in format "XXX NNNNNN". For old ID card numbers (without control digit) validator returns always FALSE.*

<!-- vars -->
[license-image]:https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
[license-url]: #license
[travis-image]:https://img.shields.io/travis/drogimex/validate-polish-id-card.svg?style=flat-square
[travis-url]:https://travis-ci.org/drogimex/validate-polish-id-card
[npm-version]:https://img.shields.io/npm/v/polish-id-card-validate.svg?style=flat-square
[npm-url]: https://npmjs.org/package/polish-id-card-validate
[downloads-image]: http://img.shields.io/npm/dm/polish-id-card-validate.svg?style=flat-square

---
_Source: https://npm.io/package/polish-id-card-validate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
