FieldCondition
FieldCondition<
TCollectionSlug> = (props) =>boolean
Defined in: packages/core/src/fields/conditions.ts:38
A pure predicate deciding whether a field is shown and validated. Runs
identically on the client (reactive visibility) and the server (skips
required/validate() when false) — collection files are part of the
browser bundle (ADR-013). A condition that throws counts as met (true) —
a failing condition must be visible, never a silent validation skip.
Exported as a standalone named type for authoring a condition function
separately from a field factory call (const cond: FieldCondition<typeof TABLE_SLUG_PAGES> = ({ data }) => …); every admin.condition property
itself is declared via method shorthand (not this type) for bivariant
checking — see baseTypes.ts’s FieldAdminConfigInput.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends VexResourceSlug = VexResourceSlug
Parameters
Section titled “Parameters”FieldConditionProps<TCollectionSlug>
Returns
Section titled “Returns”boolean