@zhiq1/rules

0.2.1 • Public • Published

安装

npm install @zhiq1/rules

使用

import  { RuleRegExp, RuleValidateFn, RuleUtils } from '@zhiq1/rules'

const rules = {
  name: [
    { pattern: RuleRegExp.Variable, trigger: 'blur' }
  ],
  age: [
    { validator: RuleValidateFn.checkNum({min: 0, max: 200, isInt: true, notNull: true }), trigger: 'blur' }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @zhiq1/rules

Weekly Downloads

0

Version

0.2.1

License

ISC

Unpacked Size

13.3 kB

Total Files

9

Last publish

Collaborators

  • zhiq1