Skip to main content

jar_form 1.2.0 copy "jar_form: ^1.2.0" to clipboard
jar_form: ^1.2.0 copied to clipboard

Reactive form management for Flutter with JAR validation schema support.

Changelog #

1.2.0 #

Features #

  • Item-scoped validation for array leaves — a field inside a JarFieldArray item now validates with its sibling values as context, so .when / .test / .custom rules discriminate per item (e.g. a Chef row requires cuisine, a Waiter row does not). The context merges form-level and item-level values, so a leaf can depend on either.

Bug Fixes #

  • getFieldValue<T> no longer throws for dynamic-registered fields (array leaves) — it casts the stored value, not the field state.

Requires #

  • jar ^1.3.0 — the per-item discrimination relies on JAR's .when instance-pollution fix.

1.1.0 #

Features #

  • Added JarFieldArray, a first-class widget for repeatable subforms (the Flutter equivalent of react-hook-form's useFieldArray)
  • Each item exposes a stable id (for widget keys) and an index, with item.path('field') resolving to the namespaced leaf name (e.g. professions.0.startTime)
  • Array operations on the builder handle: append, insert, removeAt, move, clear, plus items, length, and array-level error
  • Array-level rules (min/max/unique) and per-element validation are delegated to JAR's JarArray schema
  • getValues() now returns array data as a clean nested list (e.g. {'professions': [ {...}, {...} ]}) instead of flattened keys

Changes #

  • JarFormController gained registerArray, getArray, and unregister
  • JarFormField now re-subscribes when its name changes, keeping bindings correct as array items are reordered or removed

1.0.3 #

Changes #

  • Reverted cross-field validation changes from 1.0.2 due to issues
  • Restored stable functionality from 1.0.1

1.0.2 #

DEPRECATED - Please use 1.0.3 instead

1.0.1 #

Bug Fixes #

  • Fixed form state not updating properly when using trigger() method
  • Ensured consistent notification of form state changes to listeners

1.0.0 #

Initial release.

Features #

  • JarForm widget for form management with JAR validation schemas
  • JarFormField component for connecting form fields to controller
  • JarFormController for managing form state and validation
  • Support for synchronous and asynchronous validation
  • Form state tracking (dirty, touched, valid, submitting)
  • Two-way data binding between form controller and UI
  • Field-level validation with error messages
3
likes
150
points
19
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Reactive form management for Flutter with JAR validation schema support.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, jar

More

Packages that depend on jar_form