Bluz\Validator\Validator::__toString PHP Method

__toString() public method

Cast to string
public __toString ( ) : string
return string
    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);
    }