This is part five of Building Business Application with Silverlight series that showcases the basic building blocks of a data centric application.
So far we have seen how to validate data in sync and async fashion. We did validation in response to the changes to data, in setter of the fields. This works fine for doing individual field validation, but we also need a way to validate and track state of the entire object.
Rather than crowding the domain model, the Person class with validation and error state management logic, we will factor out validation into a separate class, PersonValidator. PersonValidator will house logic to validate individual fields and also provide method to validate entire object on demand, not just in response to changes to the data field. It will also be responsible for maintaining overall state of the object....