This package is used to validate data like Mobile Number, PAN, GST, Pincode and many more.
Currently it provides validations for the following fields
- Mobile Number
- GST
- PAN
- Pincode
- VPA
- Create a
.npmrcin the root folder and add the following lines.
//npm.pkg.github.com/:_authToken=TOKEN
@goapptiv:registry=https://npm.pkg.github.com/-
Create a personal token with read:packages permission and replace the
TOKENwith your personal token in the above mentioned file. -
Install the package using the following command
npm install @goapptiv/data-validatorimport { GaDataValidator } from '@goapptiv/data-validator';
GaDataValidator.isEmailValid('sagar.vaghela@goapptiv.com');import { GaDataValidator } from '@goapptiv/data-validator';
GaDataValidator.parseEmail('sagar.vaghela@goapptiv.com');import { GST_REGEX } from '@goapptiv/data-validator';