MishkaCmsCore. Runtime. Resources. Validations. PageStateNames
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Refuses a page whose state names an assign it may not have.
Each name becomes an atom when the page compiles and an assign when it is mounted, so it is checked here, at the action boundary every writer passes — the builder, the page form, the JSON API and a seed alike:
- it reads as an assign:
^[a-z_][a-zA-Z0-9_]*$, and not__-prefixed; - it is not one the runtime or LiveView already owns —
@page,@flash,@csp_nonceand the rest ofMishkaCmsCore.Runtime.PageState.reserved/0— because assigning over one would break the page or the runtime around it; - it appears once, because the second value would silently replace the first.
The code beside each name is MishkaCmsCore.Runtime.Resources.Validations.PageCodeCompiles's.