protected override bool IsValid(PropertyValidatorContext context) { var newValue = context.PropertyValue as string; var property = typeof(T).GetProperty(context.PropertyName); return(_items.All(x => property?.GetValue(x).ToString() != newValue)); }
protected override bool IsValid(PropertyValidatorContext context) { var newValue = context.PropertyValue as string; var property = typeof(T).GetProperty(context.PropertyName); return(_items.All(x => property?.GetValue(x).ToString() != newValue)); }