How to use we-validator - 1 common examples

To help you get started, we’ve selected a few we-validator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ChanceYu / we-validator / example / mpvue / src / pages / index / index.vue View on Github external
initValidator () {
      this.validatorInstance = new WeValidator({
        rules: {
          phoneno: {
            required: true,
            mobile: true
          },
          code: {
            required: true
          },
          username: {
            rangeChinese: [2,8]
          }
        },
        messages: {
          phoneno: {
            required: '请输入手机号',
            mobile: '手机号格式不正确'

we-validator

简单灵活的表单验证插件,支持小程序、浏览器、Nodejs

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular we-validator functions