Skip to content

feat(buzzform): implement dynamic properties and validation messages#132

Merged
ladparth merged 11 commits intomainfrom
feat/dynamic-properties
Apr 18, 2026
Merged

feat(buzzform): implement dynamic properties and validation messages#132
ladparth merged 11 commits intomainfrom
feat/dynamic-properties

Conversation

@ladparth
Copy link
Copy Markdown
Contributor

Description

This PR implements a comprehensive dynamic property system across BuzzForm core and React adapter. It enables dynamic validation messages, validator arguments ($args), and enhances the expression system to support recursive resolution for default values and layout properties.

Key Changes

Core (form-core)

  • Changed validation message type from string to ExprText to support dynamic interpolation and logic.
  • Added $args expression node and ${/args/...} template support for referencing resolved validator arguments.
  • Added isRequired argument to the built-in required validator for dynamic toggling.
  • Added resolveBooleanExpr helper for optimized condition evaluation.
  • Added resolution helpers for layout fields (tabs, collapsible) to support dynamic labels and states.
  • Support dynamic defaultValue resolution in extractDefaults.

React Adapter (form-react)

  • Updated Field and LayoutField components to use resolveBooleanExpr for robust evaluation of visibility and state properties.
  • Enhanced useResolvedFieldText to support $fn registry calls in dynamic labels, placeholders, and descriptions.
  • Support dynamic defaultValue resolution in useForm.

Docs / Web (apps/web)

  • Updated public documentation for dynamic-values and validation to reflect the new capabilities.
  • Added exhaustive test coverage for dynamic properties.

Type of change

  • feat (New feature)
  • fix (Bug fix)
  • docs (Documentation changes)
  • test (Adding or updating tests)

Related Issues

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
buzzform Ready Ready Preview, Comment Apr 18, 2026 9:35pm

@ladparth ladparth self-assigned this Apr 18, 2026
@ladparth ladparth merged commit d0e37c2 into main Apr 18, 2026
3 checks passed
@ladparth ladparth deleted the feat/dynamic-properties branch April 18, 2026 21:35
@github-actions github-actions Bot mentioned this pull request Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Allow passing async functions to the form schema

1 participant