Skip to content

v0.2.0 — Dynamic Form Logic

Choose a tag to compare

@jpmanson jpmanson released this 17 Feb 12:29
· 4 commits to main since this release

What's New

Conditional Field Visibility

  • visible_when attribute on any field with operators: equals, not_equals, in, not_in, gt, lt, is_empty, is_not_empty
  • evaluate_visibility() function for runtime evaluation
  • Form.get_visible_fields(data) helper

Dependent Field Options

  • DependentOptionsConfig model for parent-child option relationships
  • dependent_options attribute on SelectField/RadioField

Multi-Step Wizard Forms

  • FormStep model with title, description, validation_mode, skippable
  • Form.get_steps(), Form.validate_step(), Form.validate_all_steps()
  • HTML export renders steps as <section> with data-wizard attributes

Dynamic Validation

  • validate_form_data_dynamic() — opt-in validation respecting visibility rules
  • Legacy validate_form_data() unchanged (backward compatible)

Other

  • Duck-typing cleanup (isinstance checks)
  • Resolver priority ordering for type discrimination
  • i18n messages for wizard/visibility (EN + ES)
  • 151 tests passing

Full Changelog: v0.1.1...v0.2.0