I created a simple validator for the RadzenDropDown component. The code is simple:
'''
public class MultipleDropDownRequiredValidator : ValidatorBase
{
protected override bool Validate(IRadzenFormComponent component)
{
var data = component.GetValue();
if (data is List<int> list)
{
if (list.Count > 0)
return true;
}
return false;
}
}
'''
The problem is that when the Validate method code is called, the value is empty. The data is not yet in the list. Can you advise what I am doing wrong?