iview input框输入内容验证

原文链接: https://my.oschina.net/u/3669210/blog/1634979

ruleValidate: {

pwd: [{
                  required: true,//是否不能为空
                  message: '密碼不能爲空',//秀出的信息
                  trigger: 'blur'//触发事件
                },
                {
                  type: 'string',
                  pattern: /^[a-zA-Z]+[a-z0-9A-Z\W]{5,49}.*$/,//正则表达式验证
                  message: '必須輸入6-50個以字母開頭任意字串!',
                  trigger: 'blur'
                }
              ],

}

转载于:https://my.oschina.net/u/3669210/blog/1634979

你可能感兴趣的:(iview input框输入内容验证)