npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

validators-all

v1.0.19

Published

Validate all the input text with ease

Downloads

4

Readme

Password validation, Email validation, phone Number validation, Pin validation, IP validation, PAN validation, Password validation, Passport validation

GitHub Repository https://github.com/Rohit221990/all-validation.git

Email Validations

emailValidate(value, required)

value(Email value)
required(Required field: true, false)

Example:
emailValidate('[email protected]', true) // If field is required
----return bool


emailValidate('[email protected]', false) // If field is not required
----return bool


##Password Validation

Call passwordValidate function with following parameters

 var response = passwordValidate(passwordValue, minlength, maxlength, required)
 Example
 passwordValidate('abc123_', 4, 8, true)
----- return bool

# Call passwordValidate function with following parameters

 var response =  passwordValidate(passwordValue, patternType, required)
 Example:
 passwordValidate('abc123_', "^(?=.*[0-9]+.*)(?=.*[a-zA-Z]+.*)[0-9a-zA-Z]{6,}$", true)
---- return bool

 patterns details: http://regexlib.com/Search.aspx?k=Password&AspxAutoDetectCookieSupport=1

 Pattern Type:
//Validate with one character, one number and one special character(if there)
^(?=.*[0-9]+.*)(?=.*[a-zA-Z]+.*)[0-9a-zA-Z_@./#&+-]{6,8}$

// Validate with one Character, one Capital character, one special character and one number
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[#&^%$@!_*-]).{6,8}$

//Validate with character, number and no special character
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,8})$

Passport validation with given maxlength

var response = passportValidate(value, length, required)

Example:
passportValidate('ASWR45G', 7, true)
----- return bool

Indian PAN Card validation

var response = panCardValidate(value, required)

Example:
panCardValidate('value', true)
-----return bool

([a-zA-Z]){5} -> Alphabets should be 5 in number.

([0-9]){4} -> Numbers should be 4 in number.

([a-zA-Z]){1} -> Alphabets should be 1 in number.

pin code Validations


var response = pinCodeValidate(value, place, required)

Example:
pinCodeValidate('000000','IND', true)
 ------return bool

validate area Phone number validation

Any area validation. Example: 'US','IND','IRAN','ITALI','SA','INDONESIA','UK','Other'


var response  = phoneNumberValidate(value, area, required)

Example:
phoneNumberValidate('phone number',area, true)
---return bool

Many validation functions are available:

validateIP(value, type, required) // Example: validateIP('192.168.34.56', 'IPv4', true) OR validateIP('IPv6 value', 'IPv6', true)
validateDomain(value, required) // Example validateDomain('www.google.com', true) OR validateDomain('www.google.com', false)
validatePrice(value, required) // Example validatePrice('23:00', true) OR validatePrice('33:00', false)