GroupFieldInput
Defined in: packages/core/src/fields/group/types.ts:87
Configuration input for a group() field.
Group fields store a named set of sub-fields as a single nested object.
All properties except fields are optional; unset properties fall back
to the defaults applied by group().
Defaults applied by group():
{ type: "group", label: "", // inferred from the field key by defineCollection required: false, defaultValue: {}, admin: { hidden: false, readOnly: false, position: "main", width: "100%", cellAlignment: "left", defaultCollapsed: false, }}Example
Section titled “Example”seo: group({ label: "SEO", fields: { title: text({ required: true }), description: text(), }, // Collapsed on load — secondary metadata, not the primary edit target. admin: { defaultCollapsed: true },})- GroupField for the resolved output type
- group for the config function that produces this type
Extends
Section titled “Extends”BaseFieldInput<TCollectionSlug,TFieldKey,TFieldMeta>
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends VexResourceSlug = VexResourceSlug
TFieldKey
Section titled “TFieldKey”TFieldKey extends string = never
TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends object = { }
Properties
Section titled “Properties”admin?
Section titled “admin?”
optionaladmin?:GroupFieldAdminConfigInput<TCollectionSlug>
Defined in: packages/core/src/fields/group/types.ts:103
Admin UI configuration for this field.
Overrides
Section titled “Overrides”defaultValue?
Section titled “defaultValue?”
optionaldefaultValue?:Record<string,unknown>
Defined in: packages/core/src/fields/group/types.ts:101
Pre-filled value shown when creating a new document. Defaults to {}.
Overrides
Section titled “Overrides”description?
Section titled “description?”
optionaldescription?:string
Defined in: packages/core/src/fields/baseTypes.ts:516
Semantic description of the field. Used in three places:
- Helper text rendered below the field input in the admin form UI.
- As the Zod
.meta({ description })value for form validation. - As the JSDoc comment on the generated document interface property.
To write a separate JSDoc comment, use interfaceDescription in addition.
Inherited from
Section titled “Inherited from”fields
Section titled “fields”fields:
Record<string,AdminField>
Defined in: packages/core/src/fields/group/types.ts:99
Sub-fields that form the object’s shape.
Accepts any AdminField value, including nested group() or array().
Each sub-field uses its own required setting for both Zod validation
and Convex schema generation.
index?
Section titled “index?”
optionalindex?:FieldIndexConfigInput<TCollectionSlug,TFieldKey>
Defined in: packages/core/src/fields/baseTypes.ts:545
Create a database index on this field. The string value becomes the index name in Convex.
Example
Section titled “Example”slug: { type: "text", index: "by_slug", required: true }// Generates: .index("by_slug", ["slug"])
author: { type: "relationship", index: { name: "by_author_status", additionalFields: ["status"] } }// Generates: .index("by_author_status", ["author", "status"])Inherited from
Section titled “Inherited from”interfaceDescription?
Section titled “interfaceDescription?”
optionalinterfaceDescription?:string
Defined in: packages/core/src/fields/baseTypes.ts:518
The JSDoc comment on the generated document interface property
Inherited from
Section titled “Inherited from”BaseFieldInput.interfaceDescription
interfaceName?
Section titled “interfaceName?”
optionalinterfaceName?:string
Defined in: packages/core/src/fields/group/types.ts:102
label?
Section titled “label?”
optionallabel?:string
Defined in: packages/core/src/fields/baseTypes.ts:507
Display label for the field in the admin form.
Inherited from
Section titled “Inherited from”
optionalmeta?:TFieldMeta
Defined in: packages/core/src/fields/baseTypes.ts:546
Inherited from
Section titled “Inherited from”required?
Section titled “required?”
optionalrequired?:boolean
Defined in: packages/core/src/fields/baseTypes.ts:524
Whether this field is required.
Default: false
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”validate()?
Section titled “validate()?”
optionalvalidate(props):void|Promise<void>
Defined in: packages/core/src/fields/group/types.ts:105
Server-only async validation with value typed as Record<string, unknown>.
Parameters
Section titled “Parameters”FieldValidateProps<TCollectionSlug, Record<string, unknown>>
Returns
Section titled “Returns”void | Promise<void>
Overrides
Section titled “Overrides”BaseFieldInput.validate