function validateMaxScannedEntries(params, config, min) {
    let maxScannedLifecycleListingEntries = config.maxScannedLifecycleListingEntries;

    if (params['max-scanned-lifecycle-listing-entries']) {
        const maxEntriesParams = Number.parseInt(params['max-scanned-lifecycle-listing-entries'], 10);

        if (Number.isNaN(maxEntriesParams) || maxEntriesParams < min ||
            maxEntriesParams > maxScannedLifecycleListingEntries) {
            return { isValid: false };
        }

        maxScannedLifecycleListingEntries = maxEntriesParams;
    }

    return { isValid: true, maxScannedLifecycleListingEntries };
}
validateMaxScannedEntries - Validates and returns the maximum scanned entries value.

@param {object} params - Query parameters
@param {object} config - CloudServer configuration
@param {number} min - Minimum number of entries to be scanned
@returns {Object} - An object indicating the validation result:
  - isValid (boolean): Whether the validation is successful.
  - maxScannedLifecycleListingEntries (number): The validated maximum scanned entries value if isValid is true.