public function getValidationErrors()
    {
        $errors = [];
        if (isset($this->response->errors)) {
            foreach ($this->response->errors as $error => $reasons) {
                $errors[] = [
                    'attribute' => $error,
                    'reason'    => $this->getValidationReasonsAsString($reasons),
                ];
            }
        }

        return $errors;
    }
public function getValidationErrors()
    {
        $errors = [];
        if (isset($this->response->errors)) {
            foreach ($this->response->errors as $error => $reasons) {
                $errors[] = [
                    'attribute' => $error,
                    'reason'    => $this->getValidationReasonsAsString($reasons),
                ];
            }
        }

        return $errors;
    }
public function getValidationErrors ( ) { $ errors = [ ] ; if ( isset ( $ this -> response -> errors ) ) { foreach ( $ this -> response -> errors as $ error => $ reasons ) { $ errors [ ] = [ 'attribute' => $ error , 'reason' => $ this -> getValidationReasonsAsString ( $ reasons ) , ] ; } } return $ errors ; }
Get validation errors that occurred in requests.

@return array
Get validation errors that occurred in requests .