Hello, we have a problem that when a custom question is created (on Angular), there is only one validator option, while on built-in text question there are muiltiple options. Is it possible to have these built-in options on a custom question?
Custom question doesn't have all validator types.
Answers approved by surveyjs Support
Hello,
To display more validator options for a custom question type, obtain the settings.supportedValidators item for your custom question type and assign a JavaScript array of validator options to it:
JavaScriptimport { settings } from "survey-core";
settings.supportedValidators["custom-question-type"] = [
"numeric",
"regex",
"text",
"email"
];
For the record: you can review built-in validators in our source code: validator.ts.
Please let me know if you have any questions.