0.0.4 • Published 5 years ago

@tydic-group/plugin-regular-check v0.0.4

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

plugin-regular-check

正则校验插件

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

在表单中的使用方式

ruleValidate: {
    name: [
        {
            'required': true,
            'validator': checkReg.number1.validator
        }
    ]
}

函数中的使用方式

validator函数的三个参数:
1、custom:自定义校验,也可以校验具体的值。例如:数字(number),电话(phone)......
   regexp: 自定义正则
   message:自定义验证提示信息
   validateType:自定义校验时的校验类型
2、value值

3、回调函数

checkReg.custom.validator({dot:"",regexp:"",message:"",validateType:'number'},'aaa',(val)=>{

},{});
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago