Validation Composition Templates

Topics: Validation Application Block
Dec 7, 2007 at 11:57 AM
Edited Dec 7, 2007 at 12:08 PM
Hi there,
I just evaluated the Validation Application Block and composed some compley validation rules.
Example (Simplified code for explanation):

<AndCompositeValidator>
<NotNullValidator />
<OrCompositeValidator>
<ContainsCharactersValidator />
<StringLengthValidator />
</OrCompositeValidator>
</AndCompositeValidator>

I want to use the same validation rules for more than one property without retyping the whole composition each time.

Is there a way to save a combination of validatiors as a template and reuse it for other properties?

Regards,
Alex