Define a field within a document, object, image or file definition fields array.
This function will narrow the schema type down to fields and options based on the provided
type-string.
Using defineField is optional, but should provide improved autocompletion in your IDE, when building your schema.
Field-properties like validation and initialValuewill also be more specific.
Define a field within a document, object, image or file definition
fields
array.This function will narrow the schema type down to fields and options based on the provided type-string.
Using
defineField
is optional, but should provide improved autocompletion in your IDE, when building your schema. Field-properties likevalidation
andinitialValue
will also be more specific.See defineType for more examples.