2 Commits

Author SHA1 Message Date
Jesús Pérez
f624b26263
feat(form-parser): constraint interpolation with single source of truth
- Add resolve_constraints_in_content() to handle ${constraint.path} patterns
- Integrate into all form loading functions (load_from_file, load_fragment_form, etc)
- Support nested path navigation (e.g., constraints.tracker.udp.max_items)
- Add test_constraint_interpolation() test

fix(nickel-roundtrip): apply constraint interpolation in roundtrip workflow

- Fix execute_form() to use load_from_file() instead of parse_toml()
- Ensures constraints are resolved in roundtrip mode

docs(examples): add constraint interpolation example

- Create examples/05-fragments/constraints.toml
- Update examples/05-fragments/array-trackers.toml to use ${constraint.*}
- Document constraint workflow in examples/05-fragments/README.md

Benefits:
- Single source of truth for validation limits
- Forms auto-resolve constraints at load time
- All layers (Forms, Nickel, Templates) sync automatically
2025-12-21 14:04:24 +00:00
Jesús Pérez
18de89b73d
chore: add examples 2025-12-18 01:11:17 +00:00