public function validateAll() { if (!$this->isValid()) { throw new Validator\Exception(reset($this->errors) ?: 'Validation failed'); } }