When using hook_FORMID_form_alter(), how does one use validation to prevent form submission? Here is the code I have, and while the errors do print to screen, the form will submit anyway. How do I prevent the form from finishing submitting?

function my_module_my_form_form_alter(&amp;$form, &amp;$form_state) {
    // calls a function during validation
    $form['#validate'][] = 'my_module_validate_address_check';
}

function my_module_validate_address_check(&amp;$form, &amp;$form_state){
    if($form_state['values']['panes']['delivery']['delivery_postal_code'] != 91006){
         drupal_set_message(t('Wrong Zip'), 'error');
        $return = FALSE;
    }

}
Use form_error($form['delivery_postal_code'], $message) instead of calling drupal_set_message().

OR try

form_set_error('delivery_postal_code', $message);