我正在使用jquery validationEngine進行表單驗證。但我無法驗證表單驗證密碼字段。它只是說「字段不匹配」,而我輸入相同的密碼以及驗證密碼字段。這裏是我的代碼,ValidationEngine密碼驗證問題
<link href="/js/jq_validation/validationEngine.jquery.css" rel="stylesheet" type="text/css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="/img/shop/local.glasses2020.co.uk/contents/js/jquery.validationEngine-en.js" type="text/javascript" ></script>
<script src="/img/shop/local.glasses2020.co.uk/contents/js/jquery.validationEngine.js" type="text/javascript" ></script>
<script>
$(document).ready(function(){
$(".test2").validationEngine();
});
</script>
<!---<script src="{$strREQUEST_URI}/img/shop/local.glasses2020.co.uk/contents/js/jquery.validationEngine_old.js" type="text/javascript" ></script>-->
<form method="post" action="{$strSecureREQUEST_URI}/register?{$smarty.server.QUERY_STRING}" id="registerform1" name="registerform" class="test2">
<div class="fname">
<div class="txtl">Username:<span style="color:red;"> *</span></div>
<div class="field">
<input type="text" class="validate[required,length[0,100]] textfield" value="" name="user" id="user" data-errormessage-value-missing="* Username is required!" data-errormessage-custom-error="Let me give you a hint: someone.noone" />
</div>
</div>
<div class="fname">
<div class="txtl">Password:<span style="color:red;"> *</span></div>
<div class="field">
<input type="password" class="validate[required] text-input" value="" name="pass" id="password2" data-errormessage-value-missing="* Password is required!" />
</div>
</div>
<div class="fname">
<div class="txtl">Verify Password:<span style="color:red;"> *</span></div>
<div class="field">
<input type="password" class="validate[required,equals[password2]] text-input" value="" name="vpass" id="vpass" data-errormessage-value-missing="* Verification Password is required!" />
</div>
</div>
</form>
請幫我弄清楚這個問題!
你的代碼是完美的,它必須成功運行,我也試過你的代碼的工作完美。 –