Checking for an empty entity reference field in hook_node_validate In checking whether a form field contains an entry, it has been typical to do something like:

if (sizeof($form_state['values']['my_field'][LANGUAGE_NONE]) &gt; 0)


because an empty field would still be an array, but an empty one. With entity reference fields, an empty field looks like:

$form_state
  values
    my_field
      und
        0
          target_id=''
          add_entityconnect_my_field_0_ = "New content"
          edit_entityconnect_my_field_0_ = "Edit content"


so that testing for the empty array fails. One could check to see if the target_id is empty, but I'm wondering if there's a way to test the form field for empty without needing to go down to that level.
Take a look at entityreference_field_is_empty(), which at least will get you up a level by checking if target_id is empty on your behalf.