-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Form validation returns false when ajax validation returns true #954
Comments
When validating a field with AJAX the following things happen:
The status is only being used to display the bubble in red or green, but it is not passed through otherwise. The return message (regardless of success or failure) is always interpreted as a validation error. First step is to avoid interpreting the return message as an error, by changing the
Into this:
What we've done here is capture an object rather than a string. This object passes the JSON status through the Next we need to change the
Into this:
Then find and remove this:
And right after
So, rather than returning just the return message (alertTextLoad), we return an object when the AJAX call is successfully completed, |
The above is half the solution, I'll update when I successfully complete the other part. The other part involves passing through the AJAX return status from the |
I fix this error with infomation by bartclaeys at this: posabsolute#954
I fix this error with infomation by bartclaeys at this: posabsolute#954
did anyone find how to solve this problem? |
i`m fixed that with litle change on function _ajax: Set the $.ajax request with parameter "async" to "false" then, on result of function: change this: thats it; |
Using version 2.6.5 the below form validation returns
false
even if all fields are correctly validated (no red bubbles). The problem is, when ajax validation happens (checking whether username exists) a green bubble appears which is considered an error and the script returns 'false'.var result = form.validationEngine('validate');
The field that causes the problem:
The text was updated successfully, but these errors were encountered: