Skip to content

Field Type

Francis Pion edited this page Jan 14, 2025 · 2 revisions

ℹ️ Allows sharing validation rules between content fields.

⚙️ Properties

Name Type Cardinality Description
UniqueName String 1..1 🗝️ The unique name of the field type.
DisplayName String 0..1 The display name of the field type.
Description String 0..1 A textual description of the field type.
DataType DataType 1..1 The type of the data fields this type hold.
Properties Miscellaneous 0..1 The validation rules of fields this type.

Boolean

N/A

DateTime

Name Type Cardinality Description
MaximumValue DateTime 0..1 The maximum date time allowed.
MinimumValue DateTime 0..1 The minimum date time allowed.

Number

Name Type Cardinality Description
MaximumValue Double 0..1 The maximum numeric value allowed.
MinimumValue Double 0..1 The minimum numeric value allowed.
Step Double 0..1 The field input step.

RelatedContent

Name Type Cardinality Description
ContentTypeId ContentTypeId 1..1 The identifier of the allowed content type.
IsMultiple Boolean 1..1 A value indicating whether or not multiple contents can be selected.

RichText

Name Type Cardinality Description
ContentType ContentType 1..1 The content type of field values.
MaximumLength Int32 0..1 The maximum length of field values.
MinimumLength Int32 0..1 The minimum length of field values.

ContentType := { "text/plain" }

Select

Name Type Cardinality Description
IsMultiple Boolean 1..1 A value indicating whether or not multiple options can be selected.
Options SelectOption 0..* The available options.

String

Name Type Cardinality Description
MaximumLength Int32 0..1 The maximum length of field values.
MinimumLength Int32 0..1 The minimum length of field values.
Pattern String 0..1 A regular expression field values must adhere to.

Tags

N/A

❔ Questions

🚧 What happens to field definitions & values when their associated field type is deleted?

🌐 Endpoints

Status Method URL Description
0% DELETE /api/fields/types/{id} Deletes a field type.
75% GET /api/fields/types Searches field types.
75% GET /api/fields/types/unique-name:{uniqueName} Reads a field type by unique name.
75% GET /api/fields/types/{id} Reads a field type by ID.
75% PATCH /api/fields/types/{id} Updates a field type.
75% POST /api/fields/types/ Creates a new field type.
75% PUT /api/fields/types/{id} Creates or replaces a field type.