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.
Validate a lesson against the bundled canonical schema, the semantic cross-field rules, and the author lints. Returns
{ valid, errors, warnings };validis errors-only (warnings never block). Does not throw.options.extensionsregistersext:exercise-type extensions. Without it, anext:exercise that a lesson declares is refused (E-EXT-UNSUPPORTED); CORE content (noext:types) validates identically regardless of the registry.options.sourceLanguageis 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 ownsource_languagekeeps it.