Skip to content

ats1999/rahul_validate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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("abc@gmail.com"))
    console.log("Yes");
else console.log("No");

Email

if(rahulValidate.isEmail("abc@gmail.com"))
    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");

About

Basics validation required by most of the apps.

Resources

License

Stars

Watchers

Forks

Packages

No packages published