src/Route/AbstractModelRoute.php
protected function modelValidationError(array $error)
    {
        $code = ('no_permission' == $error['error']) ? 403 : 400;
        $param = array_value($error, 'params.field');

        return new InvalidRequest($error['message'], $code, $param);
    }
protected function modelValidationError(array $error)
    {
        $code = ('no_permission' == $error['error']) ? 403 : 400;
        $param = array_value($error, 'params.field');

        return new InvalidRequest($error['message'], $code, $param);
    }
protected function modelValidationError ( array $ error ) { $ code = ( 'no_permission' == $ error [ 'error' ] ) ? 403 : 400 ; $ param = array_value ( $ error , 'params.field' ) ; return new InvalidRequest ( $ error [ 'message' ] , $ code , $ param ) ; }
Builds a validation error from a CRUD operation.

@param array $error

@return InvalidRequest
Builds a validation error from a CRUD operation .