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
Found while implementing #11566 (maxLength tightening). Filed unassigned — scope discipline kept it out of that PR, and the correct shape is a judgment call, not mechanical extrapolation.
What
packages/spec/src/data/field.zod.ts still declares:
minLength: z.number().optional().describe('Min character length'),
on the base field schema — the exact defect pair #11566 was ruled on for maxLength:
Authorable on every type.boolean, lookup, autonumber, … accept it; the write-time validator (packages/objectql/src/validation/record-validator.ts) enforces it only on the same ten bounded-string types as maxLength (now exported as BOUNDED_STRING_FIELD_TYPES).
The #11566 ruling (comment on that card, 2026-08-24) is the natural template: shape z.number().int().min(0 or 1) + applicability BOUNDED_STRING_FIELD_TYPES + both form rows aligned. The one open question is the lower bound (0 = explicit no-op allowed, 1 = a no-op declaration is refused).
Found while implementing #11566 (maxLength tightening). Filed unassigned — scope discipline kept it out of that PR, and the correct shape is a judgment call, not mechanical extrapolation.
What
packages/spec/src/data/field.zod.tsstill declares:on the base field schema — the exact defect pair #11566 was ruled on for
maxLength:minLength: -5andminLength: 2.5parse cleanly. (UnlikemaxLength,minLength: 0arguably has a defined meaning — "no minimum" — so the lower bound is a genuine decision:.min(0)vs.min(1), which is why this was not folded into spec:maxLengthis authorable on every field type and validated as no more than a number —maxLength: 0andmaxLength: 12.5parse cleanly #11566 as a mechanical rider.)boolean,lookup,autonumber, … accept it; the write-time validator (packages/objectql/src/validation/record-validator.ts) enforces it only on the same ten bounded-string types asmaxLength(now exported asBOUNDED_STRING_FIELD_TYPES).minLength:field.form.tsshows it fortext/textarea/emailonly,object.form.tsfor nine types (nocode). spec:maxLengthis authorable on every field type and validated as no more than a number —maxLength: 0andmaxLength: 12.5parse cleanly #11566 deliberately converged only themaxLengthrows (the ruled scope).Direction (for triage — not prescribing)
The #11566 ruling (comment on that card, 2026-08-24) is the natural template: shape
z.number().int().min(0 or 1)+ applicabilityBOUNDED_STRING_FIELD_TYPES+ both form rows aligned. The one open question is the lower bound (0= explicit no-op allowed,1= a no-op declaration is refused).Generated by Claude Code