Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

SFantasy/node-validator

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-validator

String validator for more.

NPM version npm download build status Coveralls Status David deps

Install

[sudo] npm install is-valid [--save]

Usage

var validator = require('is-valid');

validator.isEmail('abc@gmail.com'); // => true

Validators

  • isEmail(str): check if it is an Email string
  • isAllChinese(str): check if it is a string only contains Chinese characters
  • isAllEnglish(str): check if it is a string only contains English characters
  • isAllDigit(str): check if it is a string only contains digits
  • isChineseTel(str): check if it is a Chinese cell-phone number
  • isChineseIdCard(str): check if it is a 18-digit Chinese ID card number
  • isVisaCard(str): check if it is a Visa card
  • isMasterCard(str): check if it is a Master card
  • isLink(str): check if it is a link

Test

git clone git@github.com:SFantasy/node-validator.git && cd node-validator

[sudo] npm install mocha -g

mocha

or

npm test

Coverage

npm test --coverage

License

The MIT License

About

Node.js string validator for more

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.