Hook for Node Add Field? For my use case, this question revolves around the entities node and paragraph.

Fields in my projects are created under the following structure:


content_h2
paragraph_h2
content_p
paragraph_p
...


etc...

For example, I'd like to create field_name on a node, check if it exists in paragraph entity storage and if not create it. And the other way around.

I've had some success but it seems like more coding than needed.

Does a hook exist for node add field?

Example form class: field-ui-field-storage-add-form.
By the way, all the hooks are listed here there doesn't appear one that fits the task tho.

You can always add a custom validation to the field add form. 

/*
 * Implements hook_form_FORM_ID_alter()
 */
function mymodule_form_field_ui_field_storage_add_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {
  $form['#validate'][] = 'mymodule_custom_add_field_validation';
}

/*
 * Custom Validate Callback
 */
function mymodule_custom_add_field_validation(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {
  // the code that performs the check
  // if (......) {
  //   $form_state-&gt;setErrorByName('label',
  //     t('This field already exists in another entity'));
  // }
}