Custom content-type with allowed_values_function, but this function is not called

Hello,
I’ve a custom module with a custom content type, with the field defined below. It has a allowed_values_function, so I can specify the option for this selectbox. But this function is not called when I add new content. Even worse, I don’t see the category field.

langcode: nl
status: true
dependencies:
  module:
    - node
    - options
id: node.field_custommodule_category
field_name: field_custommodule_category
entity_type: node
type: list_string
settings:
  allowed_values: {  }
  allowed_values_function: 'custommodule_category_allowed_values'
module: options
locked: false
cardinality: 1
translatable: true
indexes: {  }
persist_with_no_fields: false
custom_storage: false

I’ve added the callback function In the ‘custommodule.module’ file.

function custommodule_category_allowed_values(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE){
	return  array('test1', 'test2');
}

Expected behavior: When I add a new node of this type, I expect a ‘category’ selectbox with values ‘test1’+’test2’.

Thanks

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed