Skip to content
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

checkErrorMode equals "onComplete" doesn't work correctly with the server validation #2478

Closed
andrewtelnov opened this issue Oct 22, 2020 · 3 comments
Labels
Milestone

Comments

@andrewtelnov
Copy link
Member

There are two issues there. At first server validation, survey.onServerValidateQuestions event, executed on next page, and doesn't take into account that checkErrorMode is "onComplete". The second issue, on focusing question it doesn't change the current page and if the question with the error is located on a previous page, not the last one, end-user will not see any error and the last page will be the current one.

@andrewtelnov andrewtelnov added this to the v1.8.11 milestone Oct 22, 2020
@Lionqueen94
Copy link

@andrewtelnov I currently use onServerValidateQuestions to send my data to the server, have it checked for errors, save it and return errors if present. Now I see that I should use onPartialSend to send the data to the server (I have "sendResultOnPageNext": true). In the case of "checkErrorMode":"onComplete", the onServerValidateQuestions will only be fired on complete, so to save the data for every page Next, I would have to send it to the server onPartialSend right? However, with "checkErrorMode":"onNextPage" when data gets sent to the server on each page Next, will OnServerValidateQuestions be called before onPartialSend?

@andrewtelnov
Copy link
Member Author

@Lionqueen94 survey will fire onPartialSend after onServerValidateQuestions executed and there is no any error on the page.
If you have "checkErrorMode":"onComplete" then onPartialSend will be fired without any checks.

Thank you,
Andrew

@andrewtelnov
Copy link
Member Author

By the way, I have fixed the issue by the commit above. There were the third issue, options.data in the event, do not contains all data if checkErrorMode is "onComplete". I have fixed this too.

Thank you,
Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants