Oct 022013

Extending on the last entry, we will build a validation to check to see is there is anything in the Value property.

Open up the ruleset.config and add the following section to the bottom of the xml document

<!-- Hard Coded Resolver --> <type assemblyName="HardCodedResolver" name="StottCreations.ESB.HardCodedResolver.HardCoded"> <ruleset name="Menu"> <properties> <property name="value"> <validator type="Microsoft.Practices.Modeling.Validation.NotEmptyStringValidator, Microsoft.Practices.Modeling.Validation" messageTemplate="The '{1}' property value should not be empty or null." name="Hardcoded.Value not null validator"/> </property> </properties> </ruleset> </type>

After you make the entry, you have to shut down all instances of Visual Studio (not just the one that has itineraries in the project). If you don’t you can test all you want and it won’t validate!

I put the resolver and left it blank. Went to save it (so it would validate it) and I got the following error:


There are a significant number of validation components available: