def validate_type(value, types, **kwargs):
    """
    Validate that the value is one of the provided primative types.
    """
    if not is_value_of_any_type(value, types):
        raise ValidationError(MESSAGES['type']['invalid'].format(
            repr(value), get_type_for_value(value), types,
        ))