

def validate_name(name, p=None):
    "\n    Makes sure that the package name doesn't contain any characters outside of letters and numbers\n    "
    if ((name is None) or (len(name.strip()) == 0)):
        show_error_and_exit(('Please specify the name of the package using -n or --name.' + name_template), p)
    fields = name.split('/')
    if (len(fields) != 2):
        show_error_and_exit(('The name of the package must contain exactly one slash.' + name_template))
    for n in fields:
        if (not re.match('^[a-zA-Z0-9-_]*$', fields)):
            show_error_and_exit(('The name of the package can only contain letters, numbers, dashes, underscores, and must contain a single slash.' + name_template))

dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/spark_package/spark_package.py validate_name/VarMisuse@99/206 `n`->`fields`