function withValidate(type) {
	  return Object.defineProperty(type, 'validate', {
	    value: function value(fn) {
	      this.validator = fn.bind(this);
	      return this;
	    },
	    enumerable: false
	  });
	}
function withValidate(type) {
	  return Object.defineProperty(type, 'validate', {
	    value: function value(fn) {
	      this.validator = fn.bind(this);
	      return this;
	    },
	    enumerable: false
	  });
	}
function withValidate ( type ) { return Object . defineProperty ( type , 'validate' , { value : function value ( fn ) { this . validator = fn . bind ( this ) ; return this ; } , enumerable : false } ) ; }
Adds a validate method useful to set the prop `validator` function.

@param {object} type Prop type to extend
@returns {object} the passed-in prop type
Adds a validate method useful to set the prop validator function .