Skip to content

v2.9.0 — Form partial validation

Latest

Choose a tag to compare

@maroonedog maroonedog released this 18 Sep 01:31
75aa779

Form partial validation

@maroonedog/luq/form now exports:

  • validateFields(validator, values, paths, options?) for one-off change/blur checks.
  • createPartialValidator(validator, paths) for preselecting declarations and reusing them with current form values.

Only selected declarations execute. Paths support object subtrees, wildcard array fields, and concrete rows such as rows[2].name or rows.2.name. Cross-field rules retain access to the original full input; dependent fields must be selected explicitly.

Results contain { valid, issues } and do not certify the entire form. Continue to use full validate() or parse() on submission. Existing pick(), pickAll(), and Standard Schema resolver behavior is unchanged.

Form guide · Changelog

This is a backward-compatible minor release with no new dependencies or increased size budgets.