learn-content-engine - v0.34.0
    Preparing search index...

    Function validateLesson

    • Validate a lesson against the bundled canonical schema, the semantic cross-field rules, and the author lints. Returns { valid, errors, warnings }; valid is errors-only (warnings never block). Does not throw.

      options.extensions registers ext: exercise-type extensions. Without it, an ext: exercise that a lesson declares is refused (E-EXT-UNSUPPORTED); CORE content (no ext: types) validates identically regardless of the registry. options.sourceLanguage is the source language of the set the lesson belongs to, for the card-back script lint (W-CARD-BACK-SCRIPT); a lesson that declares its own source_language keeps it.

      Parameters

      • input: unknown
      • options: { extensions?: ExtensionRegistry; sourceLanguage?: string } = {}

      Returns ValidationResult