'Validate the value of supported challenges provided by the user.
References to "dvsni" are automatically converted to "tls-sni-01".
:param str data: comma delimited list of challenge types
:returns: validated and converted list of challenge types
:rtype: str'

def _convert_and_validate(self, data):

    challs = data.split(',')
    if ('dvsni' in challs):
        logger.info('Updating    legacy    standalone_supported_challenges    value')
        challs = [(challenges.TLSSNI01.typ if (chall == 'dvsni') else chall) for chall in challs]
        data = ','.join(challs)
    unrecognized = [name for name in challs if (name not in challenges.Challenge.TYPES)]
    if unrecognized:
        raise argparse.ArgumentError(self, 'Unrecognized    challenges:    {0}'.format(',    '.join(unrecognized)))
    choices = set((chall.typ for chall in SUPPORTED_CHALLENGES))
    if (not set(challs).issubset(choices)):
        raise argparse.ArgumentError(self, 'Plugin    does    not    support    the    following    (valid)    challenges:    {0}'.format(',    '.join((set(challs) - choices))))
    return data
