JS library to validate and format common Luxembourgish administrative data.
-
Luhn and Verhoeff checks for social secuirity numbers
-
validate phone numbers with prefix
-
validate license plates
-
validate postal codes
-
0 dependencies
-
lightweight
Add the latest version of lux-utils
to your package.json:
npm install lux-utils --save
or
yarn add lux-utils
First import the lib
import luxUtils from "lux-utils";
To validate a social security number:
let isMatriculeValid = luxUtils.validateMatricule(1893120105732); //returns true
Check out the example in React here here
Checkout the doc here
- validate an address
- id number
- passport number
- formatter for phone numbers (mobile and fixed)
- formatter for license plate
- formatter for postal code