简体   繁体   English

密码形式为Foundation 5(ZURB)

[英]Password in a form, Foundation 5 (ZURB)

I use foundation ( ZURB ) here is my code: 我使用粉底( ZURB ),这是我的代码:

      <form data-abide>
      <div class="name-field">
      <label>Your name <small>required</small></label>
      <input type="text" required >
      <small class="error">Name is required and must be a string.</small> 
      </div>
      <div class="password-field">
      <label>Password <small>required</small></label> 
      <input type="password" required>
      <small class="error">A Password is required.</small>
      </div>
      <button type="submit">Submit</button>
      </form>

In the Password part I want to replace the password with dots without testing the password, because it requires a complex password of eight as: aaaaaAA2 and in my case I only simple password. 在“密码”部分中,我想用点替换密码而不测试密码,因为它需要八个复杂的密码,例如: aaaaaAA2 ,在我的情况下,我只需要简单的密码。

Thanks. 谢谢。

By overriding Abide during Foundation initialization, you can define your own custom patterns or override the default patterns to validate against. 通过在Foundation初始化期间覆盖Abide,您可以定义自己的自定义模式或覆盖要验证的默认模式。 To use simple password, 要使用简单密码,

   $(document)
   .foundation()
   .foundation('abide', {
    patterns: {
    password: /^(?=.*\d).{4,8}$/, 
   }
  });

Password must be between 4 and 8 digits long and include at least one numeric digit. 密码长度必须介于4到8位之间,并且至少应包含一位数字。 Matches 1234 | 符合1234 | asdf1234 | asdf1234 | asp123 Non-Matches asdf | asp123非匹配asdf | asdf12345 | asdf12345 | password 密码

for more http://foundation.zurb.com/docs/components/abide.html http://regexlib.com/(A(13E-t-BjvZ-WvDNI3kEXWexqe-dnRabCLhUJT4HCwiq39cFxk1bCp2xTgMv4ZLuwh4z02qwn-LwirPbo_Y1NF6Tnx6zEJKJ9ukU7WXcOnRM1))/Search.aspx?k=password&c=-1&m=-1&ps=20&AspxAutoDetectCookieSupport=1 以获得更多http://foundation.zurb.com/docs/components/abide.html http://regexlib.com/((A(13E-t-BjvZ-WvDNI3kEXWexqe-dnRabCLhUJT4HCwiq39cFxk1bCp2xTgMv4ZLuwh4z02qwnX1XCxXX1KXX1KXXK1XKxX1KXXK1XK1KXXK1YK1XC1YK1KXXK1XC1YK)密码&C = -1&M = -1&PS = 20&AspxAutoDetectCookieSupport = 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM