On Validation

Two things. First; I spent the past year away from large systems design and some of these posts might be rehashes. Second; I’m addicted to codereview.stackexchange.com

Some thoughts about validation:

Model the domain so it’s hard to get into an invalid state.

Here is where OOP techniques (patterns) really shine. Before you start coding please visit this site

http://lostechies.com/jimmybogard/2007/10/24/entity-validation-with-visitors-and-extension-methods/

Stay away from attributes.

They are evil.

http://codereview.stackexchange.com/questions/8293/asp-net-mvc-models-that-can-be-validated-without-using-attributes

Rules Engines should be a last resort.

Yep.

There is no single answer.

Hopefully your application will be more complex than a sample used in a book.

http://jeffreypalermo.com/blog/the-fallacy-of-the-always-valid-entity/