Posts Tagged ‘Validaton’

Glue code for validation (2008-11-10)

Wouldn’t it be nice to be able to just call

var report = myDto.Validate();

without sacrificing extensibillity, testabillity, etc? What about at this,

public static class ObjectExtensions
{
public static ValidationReport Validate<Subject>(this Subject subject)
{
[...]

Some thoughts about validation logic (2008-11-8)

The design of validation in software is one of those strange topics you can discuss endlessly about. Some of the major questions concerning validation:

In which Layer should validation logic reside? Is it part of the Domain Layer, part of the Presentation Layer, or is it somehow part of both?
Who is responsible for validation? [...]