public function assert($values)
    {
        $errors = $this->iterate($values);
        if (!empty($errors)) {
            throw new Exception\Invalid($errors);
        }
    }
public function assert($values)
    {
        $errors = $this->iterate($values);
        if (!empty($errors)) {
            throw new Exception\Invalid($errors);
        }
    }
public function assert ( $ values ) { $ errors = $ this -> iterate ( $ values ) ; if ( ! empty ( $ errors ) ) { throw new Exception \ Invalid ( $ errors ) ; } }
Validates the provided value, throwing an exception upon failure.

@param object|array $values An object or associative array to validate
@throws \Caridea\Validate\Exception\Invalid if validation fails
@throws \InvalidArgumentException if `$values` is null
Validates the provided value throwing an exception upon failure .