How to make an entity reference field required using states
There isn't a specific form element with the moderation state, since they are added as action submit buttons, but you could add one like this:

  if (!empty($form['moderation_state']['widget'])) {
    $form['moderation_state_hidden'] = [
      '#type' =&gt; 'hidden',
      '#title' =&gt; 'moderation_state_hidden',
      '#value' =&gt; $form['moderation']['widget'][0]['#default_value'],
    ];
  }


Then you could refer to it in your states array like this:

$form['schedule_publish_date'] ['#states'] =  array(
 'required' =&gt; array(
  ':input[name="moderation_state_hidden"]' =&gt; array('value' =&gt;"published"),
 ),
);


But using states doesn't really make sense because you can't change the moderation status of a hidden field or a non-ajax submit button.

So in that case, you could just update the form element to be required

  if (!empty($form['moderation_state']['widget']) &amp;&amp; $form['moderation_state']['widget'][0]['#default_value'] == 'published') {
    $form['schedule_publish_date']['widget'][0]['target_id']['#required'] = TRUE;
  }