'Check whether VPN target value is valid'

def check_vpn_target_para(self):

    if self.route_distinguisher:
        if ((self.route_distinguisher.lower() != 'auto') and (not is_valid_value(self.route_distinguisher))):
            self.module.fail_json(msg=('Error:    Route    distinguisher    has    invalid    value    %s.' % self.route_distinguisher))
    if self.vpn_target_export:
        for ele in self.vpn_target_export:
            if ((ele.lower() != 'auto') and (not is_valid_value(ele))):
                self.module.fail_json(msg=('Error:    VPN    target    extended    community    attribute    has    invalid    value    %s.' % ele))
    if self.vpn_target_import:
        for ele in self.vpn_target_import:
            if ((ele.lower() != 'auto') and (not is_valid_value(ele))):
                self.module.fail_json(msg=('Error:    VPN    target    extended    community    attribute    has    invalid    value    %s.' % ele))
    if self.vpn_target_both:
        for ele in self.vpn_target_both:
            if ((ele.lower() != 'auto') and (not is_valid_value(ele))):
                self.module.fail_json(msg=('Error:    VPN    target    extended    community    attribute    has    invalid    value    %s.' % ele))
