Skip to content

JS library to validate and format common Luxembourgish administrative data.

License

Notifications You must be signed in to change notification settings

stefanoTron/lux-utils

Repository files navigation

lux-utils

JS library to validate and format common Luxembourgish administrative data.

‼️ Demo ‼️

Travis npm styled with prettier

Features 💥

  • Luhn and Verhoeff checks for social secuirity numbers

  • validate phone numbers with prefix

  • validate license plates

  • validate postal codes

  • 0 dependencies

  • lightweight

Installation

Add the latest version of lux-utils to your package.json:

npm install lux-utils --save

or

yarn add lux-utils

Usage

First import the lib

import luxUtils from "lux-utils";

Example

To validate a social security number:

let isMatriculeValid = luxUtils.validateMatricule(1893120105732); //returns true

Check out the example in React here here

Doc

Checkout the doc here

TODOs

  • validate an address
  • id number
  • passport number
  • formatter for phone numbers (mobile and fixed)
  • formatter for license plate
  • formatter for postal code

About

JS library to validate and format common Luxembourgish administrative data.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published