【问题标题】:Zurb Foundation Abide password matchingZurb 基金会遵守密码匹配
【发布时间】:2013-10-19 21:22:35
【问题描述】:

我正在尝试使用 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 消息弹出,但它没有发生

【问题讨论】:

    标签: javascript zurb-foundation haml abide


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2015-06-23
      • 2014-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-06
      相关资源
      最近更新 更多