validate_draft
Check a drafted nanopub against its template and live registries to catch errors, warnings, and placeholders before publishing.
Instructions
Check one drafted nanopub against its template and the real world.
Run this on every draft before publishing. It is the pre-flight checklist in
docs/forrt-form-fields.md, actually executed: field ids checked against the
live template, choice values against the template's own enumeration, length
caps against its regex, DOIs against the registry, Wikidata QIDs against
Wikidata.
publishable is true only when there are no errors. Severities:
error would publish something false, or be rejected by the form warning a human should look, but it may be intentional info checked and fine, or deliberately not checked
Three placeholder conventions are distinguished, because only one is a
problem: «URI of step 05 …» is a back-reference the chain wizard fills
(info); {{ZENODO_VERSION_DOI}} is a release-time token the release
workflow substitutes (warning — confirm the release ran); anything else
still standing in for a value is an error.
step is inferred from the filename (05_outcome.md); pass it explicitly
for a file named otherwise. A draft whose required fields are nearly all
empty is reported once as an unfilled skeleton rather than field by field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| path | Yes | ||
| step | No |