Q:

How can I make the coupon code field in commerce mandatory? 

Using D7 commerce coupon/discount modules.  I need to make the coupon field mandatory.  Every order needs a coupon code entered.  
There is no standard "required" checkbox on the field and I tried using conditional fields module to no avail. 

A:

You must do this in a hook_form_FORM_ID_alter(). 
You wouldn't use hook_form_alter() unless you are checking on a dynamic form ID.  In this case it's better to use hook_form_FORM_ID_alter(). 
The reason for this, is that hook_form_alter() is called on every form render and hook_form_FORM_ID_alter() is only called when that specific form is being rendered. 
Add this code to your .module file to make the field required:
/**
 * Implements hook_form_FORM_ID_alter(). 
 */
function MY_MODULE_form_commerce_checkout_form_checkout_alter(&$form, &$form_state, $form_id) {
  if (! empty($form['commerce_coupon']['coupon_code'])) {
    $form['commerce_coupon']['coupon_code']['#required'] = TRUE;
  }
}

A:

You can do that by Implements hook_form_BASE_FORM_ID_alter but that would allow passing the step if the user enters any random string inside the coupon field. 
To avoid this confusion you need to use the form alter to make coupon field required and also add custom validation to check if the coupon is valid. 
if the coupon is not valid, then the user will stay in the step and will get the same error message provided by the commerce coupon module. 
I assume your custom module name is 'CUSTOM'
/**
 * Implements hook_form_BASE_FORM_ID_alter(). 
 */
function CUSTOM_form_commerce_checkout_form_checkout_alter(&$form, &$form_state, $form_id) {
  if (! empty($form['commerce_coupon']['coupon_code'])) {
    // Set code as required. 
    $form['commerce_coupon']['coupon_code']['#required'] = TRUE;
    $form['buttons']['continue']['#validate'][] = 'my_custom_coupon_validate';
  }
}

/**
 * Custom coupon validate. 
 */
function my_custom_coupon_validate(&$form, &$form_state) {
  $code = $form_state['input']['commerce_coupon']['coupon_code'];
  $order = $form_state['order'];

    $coupon = commerce_coupon_redeem_coupon_code($code, $order, $error);
    if ($coupon) {
      // Reload the order so it is not out of date. 
      $order = commerce_order_load($order->order_id);
      // Recalculate discounts. 
      commerce_cart_order_refresh($order);
    }
    else {
      form_set_error('coupon_code',$error);
    }
}

