簡體   English   中英

密碼形式為Foundation 5(ZURB)

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

我使用粉底( 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>

在“密碼”部分中,我想用點替換密碼而不測試密碼,因為它需要八個復雜的密碼,例如: aaaaaAA2 ,在我的情況下,我只需要簡單的密碼。

謝謝。

通過在Foundation初始化期間覆蓋Abide,您可以定義自己的自定義模式或覆蓋要驗證的默認模式。 要使用簡單密碼,

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

密碼長度必須介於4到8位之間,並且至少應包含一位數字。 符合1234 | asdf1234 | asp123非匹配asdf | asdf12345 | 密碼

以獲得更多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