README
pml-check
This is a plug-in for field validity checking, which contains most of the types of checks we use everyday.
Note: Windows is partially supported, see #22
Install
$ npm i pml-check --save
Usage
Introducing plug-ins into projects
const pmlCheck = require('pml-check');
let result = await pmlCheck.mobile(value);
Return value
{result: false, msg: "2"}
- Options
resut:false;
msg:
0: Missing parameters
1:Field is empty
2:Illegal field
resut:true;
msg:
'':Verifying and passing
Callable functions
mobile:Verification of mobile phone number;
isEmpty:Verify that it is empty;
idCard:Authentication of identity cards;
integer:Verification of Short Message Verification Code;
email:Verify mailbox;
chineseName:Verification of Chinese Names;
internetURL:Verify network address;
postalCode:Verify zip code;
ip: Verify ip
date:Verification date;
month:Validation month;
day:Validation day;
phone:Verifying telephone;
number:Validation number;
chineseCharacters:Verification of Full Chinese Characters;
letter:Verify all letters;
lowercase:Verify all lowercase letters;
capital:Verify all capital letters;
numberLetter:Verify numbers and letters;
numberLetterUnderline:Verify numbers and letters and underscores;
numberLetterSpot:Verify numbers and letters and points;
letterSpot:Verify letters and dots;
address:Verify address;
password:Verify password;
strongPassword:Verify Strong Password;
Questions & Suggestions
More and better inspections will continue to be updated