Click here to Skip to main content
15,905,607 members
Please Sign up or sign in to vote.
1.50/5 (4 votes)
See more:
I am using following namespace
" Microsoft.Practices.EnterpriseLibrary.Validation.Validators;"

and I have class like this:

C#
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]
Posted
Updated 18-Jan-12 18:54pm
v5
Comments
Richard MacCutchan 16-Jan-12 12:22pm    
Sorry, what?
abhishek.singh.valeteck 18-Jan-12 5:38am    
Hi SAKryukov & Richard ,
I have improved my question.
Sergey Alexandrovich Kryukov 17-Jan-12 20:01pm    
Not a question.
--SA
abhishek.singh.valeteck 18-Jan-12 5:38am    
Hi SAKryukov & Richard ,
I have improved my question.
OriginalGriff 18-Jan-12 5:44am    
Urgency deleted: It may be urgent to you, but it isn't to us. All that your stressing the urgency does is to make us think you have left it too late, and want us to do it for you. This annoys some people, and can slow a response.

1 solution

Sorry but I know nothing about Infragistic UltraValidator but some of these links[^] may prove useful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900