title: Why is the drupal 6 status message not showing what fields are required when I first submit the form
body: <p>When I submit the form without filling in one of the required fields( or any combination of required fields) there is no status message presented to let me know I have missed the required fields.
  The second time I submit the form the status message shows me what fields are required.
  The status message seems to be one step behind the form submission.</p>
  
  <p>If after the first submit I change what fields are filled in and I submit again then the status message that should have show the previous time will show now.</p>
  
  <p>When the form is filled in correctly it submits as normal.</p>
  
  <p>The form is displayed using drupal_get_form( 'otherWaysToRequest' ); 
  This is called in a template file in the theme.</p>
  
  <p>Does anyone know why the status message is one step behind?</p>
  
  <p>This is a sample of the code being used</p>
  
  <pre><code>function otherWaysToRequest(&amp;$form_state)
  {
      global $base_url;
      $pathToTheme = path_to_theme();
  
      $form['top-check'] = array(
          '#type'     =&gt; 'fieldset',
          '#attributes' =&gt; array('class' =&gt; 'checkboxes'),
      );
  
      $form['top-check']['gift'] = array(
          '#title'     =&gt; t('Included a gift'),
          '#type'      =&gt; 'checkbox',
          '#suffix'    =&gt; '&lt;br /&gt;',
          '#required'  =&gt; false,
      );
  
      $form['top-check']['contact'] = array(
          '#title'     =&gt; t('I would like to speak to you'),
          '#type'      =&gt; 'checkbox',
          '#suffix'    =&gt; '&lt;br /&gt;',
          '#required'  =&gt; false,
      );
  
      $form['name'] = array(
          '#title'     =&gt; t('Name'),
          '#type'      =&gt; 'textfield',
          '#required'  =&gt; true,
      );
  
  
      $form['email'] = array(
          '#title'     =&gt; t('Email Address'),
          '#type'      =&gt; 'textfield',
          '#required'  =&gt; true,
      );
  
      $form['bottom-check'] = array(
          '#type'     =&gt; 'fieldset',
          '#attributes' =&gt; array('class' =&gt; 'checkboxes'),
          '#description' =&gt; t('&lt;p class="Items"&gt;If you have ...:&lt;/p&gt;&lt;p class="Items"&gt;I have included .....&lt;/p&gt;')
      );
  
      $form['bottom-check']['share'] = array(
          '#title'     =&gt; t('A Share'),
          '#type'      =&gt; 'checkbox',
          '#suffix'    =&gt; '&lt;br /&gt;',
          '#required'  =&gt; FALSE,
      );
  
      $form['submit'] = array(
          '#type'         =&gt;  'image_button',
          '#src'          =&gt;  $pathToTheme.'/image.gif',
          '#value'        =&gt;  t('Submit Form'),
      );
  }
  
  function otherWaysToRequest_validate($form, &amp;$form_state)
  {
      $mail_reg_ex     = '/[-a-zA-Z0-9._]+[@]{1}[-a-zA-Z0-9.]+[.]{1}[a-zA-Z]{2,4}/';
  
      if(!preg_match($mail_reg_ex, $form_state['values']['email']))
      {
          form_set_error('email', t('Invalid email address.'));
      }
      if( 0 == $form_state['values']['gift'] &amp; 0 == $form_state['values']['contact'] )
      {
          form_set_error('gift', t('You must choose one of the first two options on the form'));
      }
  }
  
  function otherWaysToRequest_submit($form, &amp;$form_state)
  {
      //mail details
  }
  </code></pre>