I was hoping that adding a custom survey property and setting isRequired
to true for that custom property would prevent users from saving a survey without filling out that property, and surface the problem in a user-friendly way.
Perhaps I'm doing something wrong? I tried both these methods:
JavaScriptSurveyKo.Serializer.addProperty("survey", {
name: "name:text",
isRequired: true
});
and
JavaScriptSurveyKo.Serializer.addProperty("survey", {
name: "name:text"
});
SurveyKo.Serializer.findProperty("survey", "name").isRequired = true;
In either case, without filling out the survey name
property in the property grid, the saveSurveyFunc
function still gets invoked without surfacing any error.