docs: function (validator, options) {
      var when = options.default;
      var fn = function (context, config) {
        if ((when === config.context.operation) ||
            (when === 'update' && ['create', 'update'].indexOf(config.context.operation) > -1)
        ) {
          return new Date().toISOString();
        }
        return undef;
      };
      fn.isJoi = true;
      return validator.default(fn);
    }