VAB custom validation resources

Topics: Validation Application Block
Sep 25, 2007 at 10:23 AM

it would be nice to add posibility of specifiyng my own resource class in validation application block. When I want to specify error message template from resources, I have to use assembly resources. But our resources are stored in database, so ve cant use VAB for validation.

If there is some way, i would like to hear it.

Sep 25, 2007 at 12:28 PM
Hi Peter,

You will need to modify the source code to accomplish this.

Keep in mind that a resource class is just a convenience, and when specifying templates the resource class is used as a key to the resources in the assembly; the actual values from the resource classes' properties are not retrieved.

Sep 26, 2007 at 5:40 PM
We have exact same scenario. Our validation rules stored in SQL, so what we had to do was to write custom validators and we used caching block to make it efficient. Works really well. You can find everything you need in quick start source code. They show very good examples of custom validators.

Alex K.