我正在使用Microsoft.Practices.EnterpriseLibrary.Validation.Validators; [英] I am using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
问题描述
我正在使用以下名称空间
"Microsoft.Practices.EnterpriseLibrary.Validation.Validators;"
我有这样的课:
I am using following namespace
" Microsoft.Practices.EnterpriseLibrary.Validation.Validators;"
and I have class like this:
public class VendorService:IEntity
{
[RangeValidator(1, RangeBoundaryType.Inclusive, 0, RangeBoundaryType.Ignore, MessageTemplate = Invalid Vendor Service ID)]
public int VendorServiceId { get; set; }
[StringLengthValidator(0, 1000, MessageTemplate = Invalid Service Name)]
public string ServiceName { get; set; }
public bool IsValid
{
get { return ValidationBase<vendorservice>.IsValid(this); }
}
public List<string> ErrorMessages
{
get { return ValidationBase<vendorservice>.Messages(this); }
}
}
如果有任何错误,我将在Winform中使用此类的对象,该错误将存储在列表"ErrorMessages"中.
如何使用Infragistic UltraValidator设置与控件相对应的适当错误(或由表单控件生成)
[edit]添加了代码块,对HTML字符进行了编码,删除了紧急性-OriginalGriff [/edit]
I am using the object of this class in a Winform if there is any error it will get stored in the list "ErrorMessages".
how can i use Infragistic UltraValidator to set appropiate error corresponding to a control(or generated by form control)
[edit]Code block added, HTML characters encoded, urgency deleted - OriginalGriff[/edit]
推荐答案
对不起,但我对 Infragistic UltraValidator 一无所知>,但某些 ^ ]可能会有用.
Sorry but I know nothing about Infragistic UltraValidator but some of these links[^] may prove useful.
这篇关于我正在使用Microsoft.Practices.EnterpriseLibrary.Validation.Validators;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!