validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

关于same验证的一个问题

Open huaSoftware opened this issue 6 years ago • 0 comments

npm安装后,same并不生效

{
  name: 'register_email',
  display:"你输入的不{{email}}是合法邮箱|邮箱必填|太长|太短",
  rules: 'valid_email|required|max_length(20)|min_length(2)'
},
{
  name: 'register_password1',
  display:"密码必填|太长|太短",
  rules: 'required|max_length(12)|min_length(2)'
},
{
  name: 'register_password2',
  display:"输入的两次密码不一致",
  rules: 'same(register_password1)'
}

huaSoftware avatar Mar 17 '18 14:03 huaSoftware