编程知识 cdmana.com

Front end validation collection

s-verify

Introduce

Front end assembly

install

yarn add s-verify --save
# OR
npm install s-verify --save

Use

quote

import { sIDCard } from "s-verify";

call

sIDCard("string",Boolean)

Parameters

Method name Call name explain Parameters
Enterprise unified social credit code isEnterpriseCreditCode verification “ Enterprise unified social credit code ” Validation value (String)
ID number isIDCard Strictly verify the ID number & Return identity information Validation value (String), Whether the validation (Boolean)
mailbox isEmail Strict email Validation value (String)
Phone number isTel Verify phone number Validation value (String,Number)
cell-phone number isPhone Verify phone number Validation value (String,Number)
Strict password isStrictPassword The password begins with a letter , The length is in 6~18 Between , Can only contain letters 、 Numbers and underscores Validation value (String)
Postal Code isPostal Verify zip code Validation value (String)
Date time isDate Verification date time Validation value (String)
english isEnglish Verify English Validation value (String)
chinese isChinese Verify Chinese Validation value (String)
A lowercase letter isLower Verify lowercase Validation value (String)
Capitalization isUpper Verify capitalization Validation value (String)
website isUrl Verify web address Validation value (String)
character string isString Validation string Validation value (*)
Numbers isNumber Validation number Validation value (*)
Boolean isBoolean Verify Boolean Validation value (*)
function isFunction Validation function Validation value (*)
null isNull verification null Validation value (*)
undefined isUndefined verification undefined Validation value (*)
object isObject verification Object Validation value (*)
array isArray verification Array Validation value (*)
Symbol function isSymbol verification Symbol function Validation value (*)
Promise object isPromise verification Promise object Validation value (*)
Set object isSet verification Set object Validation value (*)
Wechat browser isWeiXin Verify whether it is a wechat browser -
Mobile isDeviceMobile Verify if it is a mobile terminal -
QQ browser isQQBrowser Verify that it is QQ browser -
Reptiles isSpider Verify if it's a crawler -
Ios isIos Verify that it is Ios System -
Pc isPC Verify that it is Pc End -

版权声明
本文为[Hangzhou suxiaoxiao]所创,转载请带上原文链接,感谢

Scroll to Top