Hi there,
We have a custom property called "format" used on question of type "text".
Once we change the value of this format property, we also add a validator to it, according to the option selected
JavaScriptonSettingValue: (text, value) => {
text.validators.splice(0, text.validators.length)
if (formats[value]?.validator) {
text.validators.push(Validator.createInstance(formats[value]?.validator))
}
return value
},
Now I need to be able to clear the text.validators once the the question type is changed (i.e changing the question from text to dropdown). Is there maybe a callback that is called everytime a question has the type changed?
Thanks,
Luan