How to validate node field for minimum length for a custom content type? I notice body has some preselectable minimum lengths.

How do I do this for text fields?

Also, how do I set a custom minimum length for node body of a content type?
hook_form_alter() would alter your node edit form to define a custom validate handler.

function custom_module_form_alter(&amp;$form, &amp;$form_state, $form_id){
   ...
   case 'form_id': //applying this check will help to restrict only on certain content type form
      $form['#validate'] = 'custom_validation_handler';
   break;
   ...
}


And when this validation handler is invoke upon submitting the node form it will validate the field value in following logic.

function custom_validation_handler($form, $form_state){
   if(strlen($form_state['values']['field_id']) &lt; 200){
       form_set_error('field_id', t('message about validation error'));
   }
}


If form_set_error() is invoked the form will not be submitted and will be back with validation error message.