def float_check(self, value, key):
    """
    Cast a value as a float
    :param value: The value to cast as a float
    :param key: The name of the value
    :return: The value as a float, otherwise an error message
    """

    try:
        float(value)
        return float(value), ''
    except:
        return None, 'Error: %s value must be a float' % (key)