AI OnAI Off
I guess that you only want RequiredValidator for your custom element, and the validator should be removed for MultiSelect. If my understanding is true, so you probably can do it by customizing IValidationService.GetValidatorTypesForAnElementTypeInEditView that basically returns validators for a specific element.
Yes, I want to remove "Allow multiple choices" from Edit mode.
I've tried to look at the validators in the element's default constructor but it's always null.
this.AllowMultiSelect = false;
if (this.FormElement != null && this.FormElement.Validators != null && this.FormElement.Validators.Any())
{
foreach (var validator in this.FormElement.Validators)
{
}
}
I only want to allow the required validator for a custom and remove multiselect as an Editor option for an element based on SelectionElementBlock.