Skip to content

NumberField

Defined in: packages/core/src/fields/number/types.ts:79

Resolved configuration for a number() field, after all defaults are applied.

TFieldMeta extends object = { }

admin: FieldAdminConfig

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

Resolved admin UI configuration with all defaults applied.

BaseField.admin


defaultValue: number

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

Pre-filled numeric value shown in the admin form when creating a new document.

BaseField.defaultValue


optional description?: string

Defined in: packages/core/src/fields/baseTypes.ts:252

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.

BaseField.description


optional index?: string

Defined in: packages/core/src/fields/baseTypes.ts:256

Convex index name for this field.

BaseField.index


optional interfaceDescription?: string

Defined in: packages/core/src/fields/baseTypes.ts:254

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


interfaceType: string

Defined in: packages/core/src/fields/baseTypes.ts:258

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").

BaseField.interfaceType


label: string

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

Display label shown in the admin form. Always set — inferred from the field key if not provided.

BaseField.label


optional max?: object

Defined in: packages/core/src/fields/number/types.ts:97

Maximum allowed numeric value config.

optional error?: string

Error message shown when the value exceeds the maximum.

value: number

Maximum allowed numeric value.


meta: TFieldMeta

Defined in: packages/core/src/fields/baseTypes.ts:259

BaseField.meta


optional min?: object

Defined in: packages/core/src/fields/number/types.ts:90

Minimum allowed numeric value config.

optional error?: string

Error message shown when the value is below the minimum.

value: number

Minimum allowed numeric value.


required: boolean

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

Whether this field is required in the database schema.

BaseField.required


readonly type: "number"

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