Custom field "required" validation I built a custom field type using the Field API. In hook_field_validate I have some logic to validate some very custom stuff, but when I tried to add a "This field is required" validation, I realized this hook runs on the from that you fill when you're adding a field to an entity. Then, I implemented hook_field_is_empty, which I know runs when the entity saves. Problem is, even if the hook runs and the field is empty, no validation occurs (i.e. the user doesn't get the "this is required" message, and the form submits).

So, what's the right way to do a "this field is required" validation?
Probably a stupid question but have you tried using the #required setting when you created the field i.e.

'#type' =&gt;
'textfield', 
'#title' =&gt; t('Subject'), 
'#default_value' =&gt; $node-&gt;title, 
'#size' =&gt; 60, 
'#maxlength' =&gt; 128, 
'#required' =&gt; TRUE,


from Form API reference https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#required