I have a form with a password field. Password must be at least 8 characters long.
<form action="/account/register" method="post" id="form-register"> <div class="input-row"> <input name="data[User][password]" type="password" id="FUserPassword" class="required" placeholder="Password"> </div> </form> $("#form-register").validate({ rules: { FUserPassword : { minlength: 8 } } });
It applies the "required" rule, but it just ignores the "minlength" rule.
What am I doing wrong? I use the same code (part of JS) on other pages and it works as expected.
jquery jquery-validate
forellenfuerst
source share