In this paper, we present techniques that exploit two design patterns, the Visitor pattern and the Decorator pattern, to automatically validate invariants about the data attributes in a C++ class. To investigate the pragmatics involved in using the two patterns, we perform a study of an existing, well-tested application, keystone, a parser and front-end for the C++ language. We show that these two patterns provide flexibility in terms of the frequency and level of granularity of validation of the class invariants, which are expressed in the Object Constraint Language, OCL. Our quantitative results measure the impact of these approaches and the additional faults uncovered through validation of our case study.