Using RangeValidator with byte
        Posted  
        
            by KevDog
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by KevDog
        
        
        
        Published on 2009-04-07T18:28:41Z
        Indexed on 
            2010/05/07
            22:18 UTC
        
        
        Read the original article
        Hit count: 329
        
This is the property declaration in question:
 [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = "StartFlexibility is out of range")]
    public byte StartFlexibility { get; set; }
When the validate method is called, a FormatException is thrown telling me that the value type needs to be Int32.
How to fix, please?
© Stack Overflow or respective owner