async-validator icon indicating copy to clipboard operation
async-validator copied to clipboard

正则校验的使用

Open chenxin9482 opened this issue 3 years ago • 1 comments

下面是我rules,可是失去焦点的时候不起作用,请问怎么书写

rules: {
  email: [
    {
      pattern: /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
      message: 'Opps! something went wrong here',
      trigger: 'blur',
    },
  ],
},

chenxin9482 avatar Mar 03 '22 00:03 chenxin9482

trigger选项不是async-validator提供的,建议到对应的UI库下提问

Jasery avatar Apr 13 '22 08:04 Jasery