─── V-MAF-005: alias key validation ───────────────────────────────────────── validateAliasKey validates a single alias map key (V-MAF-005). The empty string key ("") is allowed (default policy).
(key, markdownPath string)
| 159 | // validateAliasKey validates a single alias map key (V-MAF-005). |
| 160 | // The empty string key ("") is allowed (default policy). |
| 161 | func validateAliasKey(key, markdownPath string) error { |
| 162 | if key == "" { |
| 163 | return nil // empty string is the default policy — permitted |
| 164 | } |
| 165 | for _, forbidden := range []string{"/", "?", "&"} { |
| 166 | if strings.Contains(key, forbidden) { |
| 167 | return formatCompilerError(markdownPath, "error", |
| 168 | fmt.Sprintf("models: alias key %q must not contain %q (V-MAF-005)", key, forbidden), |
| 169 | nil) |
| 170 | } |
| 171 | } |
| 172 | return nil |
| 173 | } |
| 174 | |
| 175 | // ─── V-MAF-001, 002, 003, 006: identifier syntax & param validation ─────────── |
| 176 |