We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
账号:<input name="loginName" type="text" /> 密码:<input maxlength="20" name="pwd" type="password" /> 确认密码:<input maxlength="20" name="confrimPwd" type="password" /> 真实名称:<input name="name" type="text" /> <span class="msg-box n-right" style="display:none;" id="msg-register"> <span class="msg-wrap n-error" role="alert"> </span> </span> <button type="submit">注册</button> </form>
$('#submitForm').validator({ showOk: false, loadingMsg: '', ignore: ':hidden', target: '#msg-register', stopOnError: true, fields: { loginName: 'required;', name: 'required;', pwd: 'required;', confrimPwd: 'match(pwd);' }, valid: function () {} });
代码如上,密码不相同时,离开确认密码文本框时,错误信息会显示,不会消失。但是点击提交按钮时就会出现错误信息闪一下就消失的情况。但是如果把confrimPwd的match移到pwd里,就不会出现那种情况。由上匹配下没问题,由下匹配上就会出现问题
The text was updated successfully, but these errors were encountered:
No branches or pull requests
代码如上,密码不相同时,离开确认密码文本框时,错误信息会显示,不会消失。但是点击提交按钮时就会出现错误信息闪一下就消失的情况。但是如果把confrimPwd的match移到pwd里,就不会出现那种情况。由上匹配下没问题,由下匹配上就会出现问题
The text was updated successfully, but these errors were encountered: