rahul-validate
v1.0.2
Published
Basics validation required by most of the apps.
Downloads
2
Maintainers
Readme
rahul-validate
A small package with 2.11 kb unpacked size to validate basics stuffs.
Install
npm i rahul-validate
Uses
const rahulValidate = require('rahul-validate');
OR
import rahulValidate from "rahul-validate";
if(rahulValidate.isEmail("[email protected]"))
console.log("Yes");
else console.log("No");
if(rahulValidate.isEmail("[email protected]"))
console.log("Yes");
else console.log("No");
password
if(rahulValidate.isStrongPassword("Team#2ok.com"))
console.log("Yes");
else console.log("No");
text
if(rahulValidate.isText("abc"))
console.log("Yes");
else console.log("No");
Number
if(rahulValidate.isNum("abc"))
console.log("Yes");
else console.log("No");
Date
// Validate dd/mm/yyyy or dd-mm-yyyy format
if(rahulValidate.isDate("12-15-2020"))
console.log("Yes");
else console.log("No");