MishkaDocument.Resources.Validations.DocumentAddress (Mishka Document v0.0.1)

Copy Markdown View Source

Refuses a document's path — its own address, /chelekom/docs — that the site could not answer, or that another document's pages would answer too (MishkaDocument.Address).

  • It is a site path: segments of lower-case letters, digits and dashes, and :lang at most once.
  • It is outside the documentation's base, /docs, where the documents with no address of their own are read by their slug.
  • No other document of the site is read at it, above it or under it: /chelekom/docs and /chelekom/docs/headless would both answer /chelekom/docs/headless/switch. The one exception is a translation of the same document (its language_group_id) at the same address holding :lang, whose pages answer in their own language.

Checked when the path, the language, the language group or the site changes, whoever writes. An empty path is a document with no address of its own, and is not checked. The other documents are read as the system, since the address must be free whether or not the writer may read them.

Each refusal is written in the Gettext locale of the process the action runs in, errors domain of MishkaCmsCore.Gettext.

Usage

validate MishkaDocument.Resources.Validations.DocumentAddress