Skip to content

feat: Emit validare-native client-validation schemas - #2

Merged
connykaelinvisol merged 1 commit into
mainfrom
feature/validare-native-schemas
Aug 14, 2026
Merged

connykaelinvisol merged 1 commit into
mainfrom
feature/validare-native-schemas

Conversation

@connykaelinvisol

Copy link
Copy Markdown
Contributor

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.

Claude-Session: https://claude.ai/code/session_013eiUvG96i73E5vWSunxNfo

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
@connykaelinvisol
connykaelinvisol merged commit f1898e0 into main Aug 14, 2026
0 of 3 checks passed
@connykaelinvisol
connykaelinvisol deleted the feature/validare-native-schemas branch August 14, 2026 08:05
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.

1 participant