Question T6833
Visible to All Users

async validation not working properly

created 4 years ago

Hi,

I am working on an async validation, but I cannot get it to work properly.

  1. I tried to use my own async function,
  2. I also tried to use the example that can be found (isCountryExist) though this also did not work.

What I currently get:
When the validation is FALSE then I CANNOT continue with the next page of the survey which is correct. Also vice versa, when the validation is TRUE then I CAN continue with the survey. It seems that the logic/functionality is right, though the alert/warning does not show.
This was the case for both my own async function as the isCountryExist function.

Furthermore, I use React.

For clarification, I only get NO alert/warning when I try to use async validation, when I use just a normal expression validator it works fine (then I get indeed a alert).

I really hope you can help me, thanks in advance.

Answers approved by surveyjs Support

created 4 years ago

Hello,
Could you please provide the steps to show the issue with our example?
I choose react version, type: "Sp", press complete got an error, type "Spain" - leave the focus and error is disappeared.

Thank you,
Andrew
SurveyJS Team

    Comments (2)

      Hi Andrew,

      Today I tried my code again and now for some reason it did work. I did update the surveyjs-react package but not sure if that fixed it.

      Anyways, thanks for your help!

        Great!

        Andrew
        SurveyJS Team