Declarative validator for PHP 7. Inspired by Respect/Validation.
<?php declare(strict_types=1);
namespace MyNamespace;
use Acelot\Assert\Rule\{
AllOf,
StringType,
MinLength,
MaxLength
};
$v = new AllOf(
new StringType(),
new MinLength(3),
new MaxLength(256)
);
$v->assert(1); // throws a AllOfException
$v->assert('asd'); // pass