feat: Emit validare-native client-validation schemas - #2
Merged
Merged
Conversation
Switch the generated client-side schemas from FormValidation.io-shaped output to validare (@validare/core) native, so the frontend consumes JSON.parse(validationSchema)/JSON.parse(triggerSchema) directly. - ValidationSchema: rename `emailAddress` -> `email` (drop the ignored requireGlobalDomain flag); split the required check so checkable field types (radio/checkbox groups, consent checkboxes) emit the group-aware `choice` validator (min 1) instead of `notEmpty`, which can never pass for a group in validare. - Settings: add a `choice` field-type category; collapse triggerEvents to single DOM events (validare's Trigger takes one event per field) by dropping blurAndInput/changeAndBlur, moving Upload into `change`, and letting Email fall through to the `blur` default. - Remove ThresholdSchema entirely (validare has no per-field character threshold; it only ever emitted a no-op 0) and its Form.fusion wiring and the omittedFromThreshold setting. - README: document the validare-native payload and consumer wiring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013eiUvG96i73E5vWSunxNfo
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.
Switch the generated client-side schemas from FormValidation.io-shaped output to validare (@validare/core) native, so the frontend consumes JSON.parse(validationSchema)/JSON.parse(triggerSchema) directly.
emailAddress->email(drop the ignored requireGlobalDomain flag); split the required check so checkable field types (radio/checkbox groups, consent checkboxes) emit the group-awarechoicevalidator (min 1) instead ofnotEmpty, which can never pass for a group in validare.choicefield-type category; collapse triggerEvents to single DOM events (validare's Trigger takes one event per field) by dropping blurAndInput/changeAndBlur, moving Upload intochange, and letting Email fall through to theblurdefault.Claude-Session: https://claude.ai/code/session_013eiUvG96i73E5vWSunxNfo