getErrorFromObject = (error, path, value, key) => {
  if (!error[key]) {
    return `${path} doesn't satisfy the ${key} rule`; // Here should be the default error message.
  }
  return getErrorFromFunctionOrString(error[key], path, value);
}
Returns error message for error. If error does not have any property
named key, returns default error message.

@param {Object} error object error
@param {any} path
@param {any} value
@param {String} key name of error's property which value is error message
@returns {String}