public function getErrors()
    {
        if (!empty($this->fixed_error))
            return count($this->errors) ? [$this->fixed_error] : [];

        return $this->errors;
    }
public function getErrors()
    {
        if (!empty($this->fixed_error))
            return count($this->errors) ? [$this->fixed_error] : [];

        return $this->errors;
    }
public function getErrors ( ) { if ( ! empty ( $ this -> fixed_error ) ) return count ( $ this -> errors ) ? [ $ this -> fixed_error ] : [ ] ; return $ this -> errors ; }
Return the error messages produced during validation. Should be called
after validation failed, otherwise an non-relevant or empty array will be
returned.

@return array List of errors. Empty when validation succeeded.
Return the error messages produced during validation . Should be called after validation failed otherwise an non - relevant or empty array will be returned .