def is_valid_part1(entry):
    """
    Validate the password against the rule (part 1)

    The token must appear at the correct frequency.
    """
    actual_frequency = entry.password.count(entry.token)
    min_frequency = entry.param1
    max_frequency = entry.param2
    return min_frequency <= actual_frequency <= max_frequency