public function __toString() { // custom message for all chain of rules if ($this->error) { $output = $this->error; } else { $output = join("\n", $this->rules); } return $this->prepareError($output); }