我有一个类合作伙伴,我使用entlib5验证块来验证类的字段(使用数据声明)。 在其中一个方法中,我读取了db表并创建了Partner对象的绑定列表,但如果有[IgnoreNull]注释或[ValidationComposition] + [NotNullValidator],我会得到一个System.NotSupportedException(例如:ValidatorCompositionAttribute类型的验证属性不能用于验证值。)
如果我只使用[StringLengthValidator],则没有任何异常(但对于某些可以留空的字段,我需要IgnoreNull或类似的验证器,或者字符串必须在某个范围内)
什么问题?