3 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
6d045d62c9
feat(repeating-groups): implement duplicate detection across all backends
- Fix has_unique flag reading from field definition (was scanning fragment fields)
- Implement duplicate validation in CLI and TUI backends
- Add item counter update in Web backend after add/delete operations
- Refactor Web JavaScript: remove global constants, use closure-based state per group
- Store repeating group config in data-* attributes instead of global variables
- Update documentation and examples with unique = true attribute
- All backends now enforce unique items validation consistently
2025-12-21 11:38:14 +00:00
Jesús Pérez
18de89b73d
chore: add examples 2025-12-18 01:11:17 +00:00