jquery.validate 1.13.1之驗證失效!

來源:互聯網
上載者:User

標籤:style   http   color   ar   sp   log   html   bs   ef   

最近在搞一個項目,其中用到bootstrap做前端開發架構,架構裡用到了一個placeholder屬性,html5做提示用的。

但是他在ie10以下是無效的,所以用js判斷了下,在placeholder無效的情況下(if (!(‘placeholder‘ in document.createElement(‘input‘))))對其隱藏,追加一個text,設定它的val為placeholder值,這是前提。

然後就發現jquery.validate 失效了。各種找啊。大部分都是說不相容ie8的,各種孽心的試,還是不行。

最後在1.9的changelog裡發現了這麼一句

changelog裡

* Fixed #189 - :hidden elements are now ignored by default

ignore: ":hidden",

ignore: ""       就又開始驗證隱藏欄位了,希望對大家有用。

jquery.validate 1.13.1之驗證失效!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.