<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _validate_ipv4(value):
    '''
    validate ipv4 values
    '''
    if len(value) == 3:
        if not salt.utils.validate.net.ipv4_addr(value[0].strip()):
            return False, 'Invalid ip address: {0} for ipv4 option'.format(value[0])
        if not salt.utils.validate.net.netmask(value[1].strip()):
            return False, 'Invalid netmask: {0} for ipv4 option'.format(value[1])
        if not salt.utils.validate.net.ipv4_addr(value[2].strip()):
            return False, 'Invalid gateway: {0} for ipv4 option'.format(value[2])
    else:
        return False, 'Invalid value: {0} for ipv4 option'.format(value)
    return True, ''