Parsley.js,比较文本字段值

时间:2018-02-22 02:05:10

标签: javascript parsley.js parsley

使用 parsley js ,我想测试passwordpassword_confirmation字段是否匹配,但到目前为止我的下面代码都失败了。

<div class="input-field col s6">
   <i class="material-icons prefix">security</i>
   <input id="pw" type="password"name="password"  class="validate" required="" minlength="8" data-parsley-equalto="#pw1">
   <label for="icon_prefix" >Mot de passe</label>
</div>
<div class="input-field col s6">
    <i class="material-icons prefix">security</i>
    <input  **id="pw1"** type="password" name="password"  class="validate" required="" minlength="8"data-parsley-equalto="#pw">
    <label for="icon_prefix">Confirmer</label>

0 个答案:

没有答案