guillaumepotier / Parsley.js

Validate your forms, frontend, without writing a single line of javascript

Home Page:http://parsleyjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>

批注 2020-04-29 185844

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.

not cors, is same domain request.
批注 2020-04-30 103623

a public domain test. you see is
批注 2020-04-30 110035
cros

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,