MishkaCmsCore. Runtime. Resources. Validations. PathFormat
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Validates a resource path as a safe, canonical URL route path — used by the
Page, Layout, and ErrorPage resources and their drafts.
A valid path:
- starts with
/ - contains no
..(directory traversal) and no//(empty segment) - uses only URL-path-safe characters — letters, digits, and
- _ / . : *(covering nested paths, route params like:id, and wildcards like*rest) - is at most 255 characters
This runs at the action boundary in every environment, so no page can be created
or edited with a path that is traversal-prone, ambiguous (//), or unroutable. It
reports the specific rule that failed, which the JSON:API surfaces to the caller —
strict enough for production, clear enough for development.
Mirrors MishkaCmsCore.Runtime.Resources.Validations.DomainValidator.