XValidation is an easy-to-use framework that provides validation through attributes:

public class UserRepository
{
  [return: NotNull]
  public User GetOrAddUser ([NotEmpty] string username, [IsEmail] string email)
  {
    ...
  }
}

The framework includes a bunch of pre-defined validations:
  • NotNullValidation
  • NotEmptyValidation
  • RegexValidation
  • EmailValidation
  • HasValidation
  • HasAllValidation
  • CompositeValidation
  • Greater(OrEqual)Validation
  • Less(OrEqual)Validation
  • EqualValidation
  • NotEqualValidation
  • LambdaValidation
  • FileExtensionValidation

Last edited Sep 28, 2012 at 6:10 PM by matkoch, version 9