Skip to content

Conversation

@vers-one
Copy link
Owner

@vers-one vers-one commented Dec 28, 2025

Configuration options to enable / disable all validation checks

This is:

  • a bug fix
  • an enhancement

Related issue: #95

Description

This pull request:

  1. Adds configuration options to disable EPUB validation checks (one option per check). The configuration options are implemented as properties inside the classes in the VersOne.Epub.Options namespace.
  2. Adds new overloaded static methods for the EpubReader class. Now, each of the OpenBook / OpenBookAsync / ReadBook / ReadBookAsync methods has three overloads:
    • without extra parameters, which will use the EpubReaderOptionsPreset.STRICT preset and will return a non-null result
    • with the EpubReaderOptionsPreset parameter which may return a null
    • with the EpubReaderOptions parameter which may also return a null
  3. Updates the "Handling Malformed EPUB files" documentation page with the new examples.

Testing steps

Run EpubReader.ReadBook(filePath, preset) with three different presets: STRICT, RELAXED, and IGNORE_ALL_ERRORS against as many EPUB books as possible and compare the EPUB validation exceptions thrown for each of the presets. The number of validations exceptions should be less for the RELAXED preset compared to the STRICT preset and there should be no validation exceptions thrown for the IGNORE_ALL_ERRORS preset.

@vers-one vers-one self-assigned this Dec 28, 2025
@vers-one vers-one merged commit 6640515 into master Jan 26, 2026
4 checks passed
@vers-one vers-one deleted the skip-validation-checks branch January 26, 2026 18:26
@vers-one vers-one linked an issue Jan 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration options to enable / disable all validation checks

1 participant