function type(rule, value, source, errors, options) {
	  if (rule.required && value === undefined) {
	    (0, _required2['default'])(rule, value, source, errors, options);
	    return;
	  }
	  var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
	  var ruleType = rule.type;
	  if (custom.indexOf(ruleType) > -1) {
	    if (!types[ruleType](value)) {
	      errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
	    }
	    // straight typeof check
	  } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : (0, _typeof3['default'])(value)) !== rule.type) {
	    errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
	  }
	}
/**
	 *  Rule for validating the type of a value.
	 *
	 *  @param rule The validation rule.
	 *  @param value The value of the field on the source object.
	 *  @param source The source object being validated.
	 *  @param errors An array of errors that this rule may add
	 *  validation errors to.
	 *  @param options The validation options.
	 *  @param options.messages The validation messages.
	 */
Rule for validating the type of a value.
@param rule The validation rule.
@param value The value of the field on the source object.
@param source The source object being validated.
@param errors An array of errors that this rule may add
validation errors to.
@param options The validation options.
@param options.messages The validation messages.
Rule for validating the type of a value . @param rule The validation rule . @param value The value of the field on the source object . @param source The source object being validated . @param errors An array of errors that this rule may add validation errors to . @param options The validation options . @param options . messages The validation messages .
function type(rule, value, source, errors, options) {
	  if (rule.required && value === undefined) {
	    (0, _required2['default'])(rule, value, source, errors, options);
	    return;
	  }
	  var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
	  var ruleType = rule.type;
	  if (custom.indexOf(ruleType) > -1) {
	    if (!types[ruleType](value)) {
	      errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
	    }
	  } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : (0, _typeof3['default'])(value)) !== rule.type) {
	    errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
	  }
	}
function type ( rule , value , source , errors , options ) { if ( rule . required && value === undefined ) { ( 0 , _required2 [ 'default' ] ) ( rule , value , source , errors , options ) ; return ; } var custom = [ 'integer' , 'float' , 'array' , 'regexp' , 'object' , 'method' , 'email' , 'number' , 'date' , 'url' , 'hex' ] ; var ruleType = rule . type ; if ( custom . indexOf ( ruleType ) > - 1 ) { if ( ! types [ ruleType ] ( value ) ) { errors . push ( util . format ( options . messages . types [ ruleType ] , rule . fullField , rule . type ) ) ; } } else if ( ruleType && ( typeof value === 'undefined' ? 'undefined' : ( 0 , _typeof3 [ 'default' ] ) ( value ) ) !== rule . type ) { errors . push ( util . format ( options . messages . types [ ruleType ] , rule . fullField , rule . type ) ) ; } }
Rule for validating the type of a value.
Rule for validating the type of a value .
// straight typeof check