Add validate instruction and get the error

$array = array(
    'foo' => 'hello world',
    'bar' => 'fooo bar kkkqsdkqsdklqsdlqskdqskdqsdlkqsd'
);

$validation = array(
    'foo' => 'strlen=11|strlen>=11|strlen>10',
    'bar' => 'strlen>1|strlen<20'
);

$valid = new \Sohoa\Framework\Validate($array, $validation);

if ($valid->isValid() === false)
    var_dump($valid->getErrors());

var_dump($valid->getError('foo'), $valid->getError('bar'));
var_dump($valid->hasError('foo'), $valid->hasError('bar'));