Custom Validator

Topics: Validation Application Block
Feb 6, 2013 at 10:14 AM

We are using Enterprise Library 5.0 validation blocks and please suggest for the below scenario required for our development. Based on one validation result(Property of one object), it should validate another object. For eg.
If Employee.Type != "S" Then
If Customer.Address Is Null then throw "Address is mandatory"

Empoyee and Customer are different objects, based on one object, it should check other.Please advice.

Feb 7, 2013 at 4:23 AM
Edited Feb 7, 2013 at 4:25 AM
Independent multi-object validation is not a use case that the Validation Application Block was designed to handle. Usually, you would just code the rules or, if you wanted something more formal, use a rule engine.

Randy Levy
Enterprise Library support engineer
Support How-to