feat(17-01): repeater field type and the dependent dropdown save recheck

- cabana: type repeater with nested form.fields (text, textarea, number,
  checkbox, switch, dropdown, richeditor), prompt, minItems, maxItems,
  titleFrom; groups, style, nested repeaters and other types fail boot
- rows decoded before projection: only nested keys, coerced scalars,
  per-row required (field.index.nested), row bounds; ProjectWritableFields
  exempts repeater lists only, nestedValue unchanged
- nested richeditor values sanitized with notices under the row path
- dependent dropdowns rechecked on save, top level and per row; null when
  the sibling takes no choice, 422 form.dependent_invalid otherwise
- dependent-options accepts repeater.field; schema carries RepeaterForm
- backend lang repeater.max_items, repeater.min_items,
  form.dependent_invalid; TestCompanionsRepeaterSmoke; docs
This commit is contained in:
2026-10-12 15:24:01 +02:00
parent 71fa597830
commit 46835fd064
16 changed files with 961 additions and 43 deletions

View File

@@ -66,7 +66,13 @@ const (
func compileFileuploadKeys(typ string, values map[string]ast.Node, field *FormField) error {
if typ != "fileupload" {
for _, key := range fileuploadKeys {
if key == "prompt" && typ == repeaterType {
continue // a repeater's add button text
}
if _, ok := values[key]; ok {
if key == "prompt" {
return fmt.Errorf("prompt is only valid on type: fileupload or repeater")
}
return fmt.Errorf("%s is only valid on type: fileupload", key)
}
}