Question T2904
Visible to All Users

Custom validator with Ajax

created 5 years ago

I'm trying to write a custom validator function with an ajax call in it, however it's failing as there is no value returned as the call is asynchronous. Is there a way to have a custom validator that contains an ajax call?

Answers approved by surveyjs Support

created 5 years ago

Hello,

Probably this sample will be helpful - https://surveyjs.io/Examples/Library/?id=validators-async-expression&platform=jQuery&theme=default
Id describes how to use async functions in expression validators

Thanks, Serge
SurveyJS Team