index.js
function (validator, options) {
    var fn = function (context, config) {
      if (config.context.operation === 'create')
        return options.default === 'empty' ? '00000000-0000-0000-0000-000000000000' : uuid[options.default]();
      return undef;
    };
    fn.isJoi = true;
    return validator.default(fn);
  }
function (validator, options) {
    var fn = function (context, config) {
      if (config.context.operation === 'create')
        return options.default === 'empty' ? '00000000-0000-0000-0000-000000000000' : uuid[options.default]();
      return undef;
    };
    fn.isJoi = true;
    return validator.default(fn);
  }
function ( validator , options ) { var fn = function ( context , config ) { if ( config . context . operation === 'create' ) return options . default === 'empty' ? '00000000-0000-0000-0000-000000000000' : uuid [ options . default ] ( ) ; return undef ; } ; fn . isJoi = true ; return validator . default ( fn ) ; }
Set a default uuid when the the contextual operation is 'create'.

@param {Joi} validator - the object that is having a default set
@param {DefaultSpecifierOptions} options - the options for setting the default
@param {String} options.default - [empty, v1, v4]
@returns {Joi} - the new validator
Set a default uuid when the the contextual operation is create .