I would just get rid of the ValidatorComposition
and TypeConversionValidator
declarations as I think they are redundant here. That would get rid of your error and a couple of lines of code too.
The property is already strongly-typed to the Address
class so there is no way you can set it in code to an object that isn't an Address
or isn't polymorphic with Address
- having an extra validator to check this is redundant.
The default composition of validators is logical AND anyway, you only need to specify validator composition when you want to OR a group, or use more complex groups that combine AND / OR.
Sam
2010-02-04 04:13:02