Help articles

Block type cannot be used outside of array

Sanity Studio supports the block type only inside an array, not as a standalone field. Block content is an array by definition, so the Studio reports Invalid standalone block field(s) "myField". Block content must be defined as an array of blocks.

This will not work:

{
  name: 'myField',
  title: 'My field',
  type: 'block'
}


But this will:

{
  name: 'myField',
  title: 'My field',
  type: 'array',
  of: [{type: 'block'}]
}

Was this page helpful?