@lumit/libvalidation
v1.20.1
Published
misc validation for various strings, such as postal codes, email, phone number etc
Readme
Lumit validator
This library validates phone numbers, integers, ISO8601 dates, postal codes, emails, real numbers, and escapes HTML.
Installation
You need an npm account to use this library. If you aren't logged in already, log in using your terminal:
npm login --scope=@lumit Then, install the library:
npm i @lumit/libvalidationAfter installation, go to node_modules -> @lumit/libvalidation -> test.mjs to see how the library works.
Usage/Examples
import validation from './libvalidation.mjs';
...
const val = new validation();
const nr1 = '0701234567'
console.log(`${nr1}:${val.phone(nr1)}`);
Publish
To publish a new version of the library:
- Navigate to the root directory of the package
cd node_modules/@lumit/libvalidation- Update the package to a newer version
npm version minor- Publish the new version
npm publish --access restricted