StringLengthValidator mapping to MaxLength?

Topics: Validation Application Block
May 26, 2008 at 8:03 AM
I can't be the only one who's come across this, yet a search on this forum reveals almost no chatter on mapping a textbox's MaxLength property to the StringLengthValidator exposed (of there is one) by the validator set to validate that textbox. The connection is there (ProxyValidator is connected to textbox, so it should be able to reach into the control and set a property), so am I missing a really simple way to set this, or do I have to write a bunch of reflection code to do this every time, or custom extend the VAB? There is nothing in the walkthrough docs or API docs that answers this either. I spent a while on Google searching for this too, and could find nothing, so I either assume it's a stupid question and the answer is obvious (I hope), or it's just not something that's done. If the latter, can someone explain why not? And, if the former (and I don't mind asking stupid questions), can someone point me in the right direction for setting MaxLength in a validated textbox?
I'll be happy to go into more detail if need be, but I feel the question is pretty obvious. Any takers? Thanks in advance...