You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Gap]: add bounded conditional and date-range validation to forms #528
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
In test5/form-lab, an agent built an onboarding form with required fields, email and phone validation, a start date constrained to today through two years ahead, and companyName required only when kind is business.
Where it broke down
The forms extension supports individual field constraints but no bounded cross-field rule or date-range semantics. The agent wrote a custom validate.mjs for both the conditional requirement and relative date comparison, duplicating field extraction and error-map construction.
Code or YAML you had to write by hand
Sanitized hand-written rules: if (kind === "business" && !companyName) errors.companyName = "required"; if (parsedDate < today || parsedDate > twoYearsFromToday) errors.startDate = "out of range". The task also needed a stable field-to-message 422 response.
What you could not verify
This is one benchmark, and its custom implementation passed only 4/9 acceptance checks; the failures are not evidence of a runtime defect. Do not add arbitrary expression evaluation or broad JSON Schema conditionals. Evaluate a portable, declarative subset such as a field-local RFC 3339 date validator with explicit absolute/relative bounds plus a one-level requiredWhen against a declared sibling enum value. Related: #425.
Triage decision: retain as evidence-gathering, not an implementation commitment. Do not add conditional/date validation until repeated independent evidence establishes a bounded, portable subset; preserve the issue guardrails as future acceptance criteria. Removing needs-decision.
Decision (owner, 2026-09-24): conditional required fields as requiredWhen: { field, in: [values] } — the referenced field must be a sibling select/enum field and each value one of its declared options (checked at startup); one level only; server-enforced (422). AND/OR chains, not-equal, comparisons, cross-field ordering and show/hide stay in onSubmit. Absolute date bounds are in #697; relative dates remain a follow-up.
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
Activity
jimhoyd commentedon Sep 24, 2026
Triage decision: retain as evidence-gathering, not an implementation commitment. Do not add conditional/date validation until repeated independent evidence establishes a bounded, portable subset; preserve the issue guardrails as future acceptance criteria. Removing
needs-decision.fix(forms): validate date and datetime-local field submissions (#684)
jimhoyd commentedon Sep 24, 2026
Decision (owner, 2026-09-24): conditional required fields as
requiredWhen: { field, in: [values] }— the referenced field must be a sibling select/enum field and each value one of its declared options (checked at startup); one level only; server-enforced (422). AND/OR chains, not-equal, comparisons, cross-field ordering and show/hide stay in onSubmit. Absolute date bounds are in #697; relative dates remain a follow-up.feat(forms): date and datetime-local minimum/maximum bounds (#697)