remote validate passed but submit fail
xiaofanku opened this issue · comments
<form id="register" method="post" action="${BASE}/member/register" class="theme-form parsley-form" data-parsley-validate> <div class="form-group"> <label for="names">帐号:</label> <small class="form-text text-muted">名称长度必须介于5个字符和20个字符之间,并且只能使用字母数字字符</small> <input type="text" name="names" size="25" value="${form.names}" class="form-control" placeholder="会员的登录帐号名称" data-parsley-required data-parsley-length="[5, 20]" data-parsley-remote="${BASE}/member/detection/unique" data-parsley-remote-message="用户名已经存在" tabindex="1"/> </div> <input type="submit" name="register" id="submit" value="免费注册" data-submit-disabled="请稍后" class="btn btn-primary" tabindex="7"/> </form>
i used version: 2.9.1, jquery: 3.2.1, server response: 200. remove data-parsley-remote is worked
I suspect you are using different domains and you have a CORS issue, please see #1039.
If not you will have to produce a minimal reproducible example.
I suspect you are using different domains and you have a CORS issue, please see #1039.
If not you will have to produce a minimal reproducible example.
i try replace input type=submit
to button type=submit
is worked, what is reason?
i try replace input type=submit to button type=submit is worked, what is reason?
Strange. That should not make any difference. Are you sure that's the only thing you have changed?
I doubled checked that on our remote example it seems to work the same for <input>
or <button>
. You can play with it by clicking the codepen button in http://parsleyjs.org/doc/examples/ajax.html for example
i try replace input type=submit to button type=submit is worked, what is reason?
Strange. That should not make any difference. Are you sure that's the only thing you have changed?
yes, I'm the only one of the developers
I doubled checked that on our remote example it seems to work the same for
<input>
or<button>
. You can play with it by clicking the codepen button in http://parsleyjs.org/doc/examples/ajax.html for example
At least I'm sure this is not the cause of CORS,