for key, value in validation.items():
    if validation[key] == 1:
        data[key] = re.sub(r'[^\w\s@.]', '', FILTER_SANITIZE_EMAIL)
    elif validation[key] == 3:
        data[key] = re.sub(r'[^\w\s]', '', data[key])
        GeneralSanitization = False
    elif validation[key] == 4:
        data[key] = re.sub(r'[^0-9]', '', data[key])
        GeneralSanitization = False
    elif validation[key] == 5:
        data[key] = re.sub(r'[^\w\s]', '', data[key])
        GeneralSanitization = False
    elif validation[key] == 6:
        data[key] = re.sub(r'[^\w\s[:punct:]¡¿]', '', data[key])
    elif validation[key] == 7:
        data[key] = re.sub(r'[^\w\s[:punct:]¡¿\x20-\x7F]', '', data[key])
    elif validation[key] == 8:
        data[key] = re.sub(r'[^\x20-\x7F]', '', data[key])
    elif validation[key] == 9:
        data[key] = re.sub(r'^([a-zA-Z0-9_-]+)([^a-zA-Z0-9_-]+).*$', r'\1', data[key])

    if GeneralSanitization:
        data[key] = re.sub(r'[^\w\s]', '', data[key])
spam lang_mismatch quality