Skip to main content

Interface: FormFieldConstraints

Defined in: packages/core/src/types.ts:74

Structural constraints extracted from Zod's _zod.bag for a field. Used to populate HTML validation attributes (min, max, minLength, pattern, etc.) and to drive the L2 native-rules optimizer output.

Properties​

format?​

optional format?: string

Defined in: packages/core/src/types.ts:86

String format name (from z.string().email() → 'email', etc.).


max?​

optional max?: number

Defined in: packages/core/src/types.ts:78

Maximum numeric value (from z.number().max()).


maxLength?​

optional maxLength?: number

Defined in: packages/core/src/types.ts:82

Maximum string length (from z.string().max()).


min?​

optional min?: number

Defined in: packages/core/src/types.ts:76

Minimum numeric value (from z.number().min()).


minLength?​

optional minLength?: number

Defined in: packages/core/src/types.ts:80

Minimum string length (from z.string().min()).


pattern?​

optional pattern?: string

Defined in: packages/core/src/types.ts:84

Regex pattern as a string (from z.string().regex()).


step?​

optional step?: number

Defined in: packages/core/src/types.ts:88

Step constraint for numeric inputs (1 for integer-constrained fields).