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); }
}
}
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]