Object Validation

Topics: Validation Application Block
Jan 31, 2008 at 2:22 PM
I have ruleset
<StringLengthValidator(0, 2, Ruleset:="CustomerName")> _
Public CustomerName As String

When I validate the object, validation is successful even if the name is more than 2 characters.
Below is the code that I use to validate the object.
r = Validation.Validate(Of Customer)(myCustomer)

But individually if I validate the Property/Field the validation fails whenever it has to fail.
r = Validation.Validate(Of Customer)(myCustomer, "CustomerName")

I only other way that I can think to implement this is to have two attributes of the same type of validation.
Which sounds reduntant.

Is there any thing that I'm missing?

Any reply would be of great help.