fix: harmonize validation modes and core type inference#124
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR synchronizes the BuzzForm documentation with the current codebase while resolving several critical behavioral/type gaps identified during the audit. It fixes the validation trigger waterfall logic and corrects primitive array type inference for named items.
Key Changes
Core (
form-core)InferTypewhere named child fields inprimitive: truearrays were incorrectly inferred as flat values. They now correctly resolve to object-wrapped arrays (e.g.,{ name: value }[]), matching the UI component's runtime behavior.React Adapter (
form-react)derivedValidationMode. Triggers now follow a "waterfall" logic:"submit"(default): Runs on submit."blur": Runs on blur AND submit."change": Runs on change, blur, AND submit.derivedValidationModeto"submit"to match documentation and expected core behavior.Docs / Web (
apps/web).mdxfiles.boolean(correct) instead ofstringor ternary results.maxTagLengthis a UI-level constraint enforced by the tag component rather than an auto-derived schema validator.array.mdxto accurately describe flat vs. object-wrapped inference choices.Type of change
feat(New feature)fix(Bug fix)docs(Documentation changes)refactor(Refactoring code without changing behavior)test(Adding or updating tests)chore(Maintenance, CI/CD, or Ops-related changes)Related Issues