Question T1961
Visible to All Users

Expression Validations

created 6 years ago (modified 6 years ago)

Hey Survey JS team,

Is there a way to manually call validations on Expression question types? I created a custom function for an expression to check if a dropdown question has choices or not. Looks like the validation doesn’t happen until I make an edit on the survey. Is there any way for me to call on the validation from the onLoadChoicesFromServer function? I’m looking for something like:

survey.onLoadChoicesFromServer.add(function (survey, options) {
                        RecheckValidationsOnAllExpressions();             // something like this
                    });

Thanks,
Saswat Gorkhali

Answers approved by surveyjs Support

created 6 years ago

Hello,
You may call survey.currentPage.hasErrors() function.

Thank you,
Andrew
SurveyJS Team