<commit_before># This file is part of the Indico plugins.
# Copyright (C) 2002 - 2022 CERN
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.

import re

from wtforms import ValidationError

from indico.util.string import is_valid_mail

from indico_payment_paypal import _


def validate_business(form, field):
    """Valiates a PayPal business string.
<commit_msg>Fix docstring typo<commit_after># This file is part of the Indico plugins.
# Copyright (C) 2002 - 2022 CERN
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.

import re

from wtforms import ValidationError

from indico.util.string import is_valid_mail

from indico_payment_paypal import _


def validate_business(form, field):
    """Validates a PayPal business string.

{'fraction_non_alphanumeric': 0.055900621118012424, 'fraction_numerical': 0.016563146997929608, 'mean_word_length': 4.525714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3007739', 'n_tokens_mistral': 294, 'n_tokens_neox': 270, 'n_words': 126}