Easy Questions on validation.Can you help?

Topics: General discussion, Validation Application Block
Jul 28, 2008 at 6:54 AM
Edited Jul 28, 2008 at 7:08 AM

I am using the validation block via config.

How do you set up the following  SqlServer Value

name(varchar 20 ) allows null
addressType(tinyInt)allows null

My Rules
Name
You can enter a null value
Max Value when entered must be 20 chars

StringValidator
LowerBound 0 ignore
UpperBound 20 inclusive

AddressType
You can enter a null value
Max Value when entered must be 255

RangeValidator
LowerBound 0 ignore
UpperBound 255 inclusive

I get the error
Message = "The length of the value must fall within the range \"0\" (Ignore) - \"20\" (Inclusive)."

How should I set it up?

Not sure if matters but all my strings are initialised to be string.empty and integers to be 0.

Thanks