Zurb Foundation Abide密码匹配

时间:2013-10-19 21:22:36

标签: javascript zurb-foundation haml abide

我正在尝试使用Zurb基础匹配密码,一切正常,除了data-equalto标记,我的代码是:

 .password-field
        %label
          Parola
          %small necesar
        %input#pw1{required: '', type: 'password'}
        %small.error A strong password is needed
      .password-field
        %label
          Confirma Parola
          %small necesar
        %input{required: '', type: 'password' , "data-equalto"=> 'pw1'}
        %small.error A strong password is needed or passwords do not match

我期待弹出A strong password is needed or passwords do not match消息,但它没有发生

1 个答案:

答案 0 :(得分:0)

密码验证模式已被删除,大概是因为对于什么使密码“足够强大”存在不同的意见。

但是,您可以定义自己的密码字段要求。请参阅abide docs

$(document).foundation({
  abide : {
    patterns: {
      password: /^yourRegexHere/
    }
  }
});