form_set_error Not displaying error after invalid form submission I've created a form using my custom module. At the validation handler, I'm calling form_set_error() but no error messages are being displayed.

Also, I've marked several fields as '#required' =&gt; true; do I need to validate them manually? I thought Drupal will be validating them automatically and displaying error messages. But I see no error message for them, when I submit invalid data (i.e. not providing any value for the default fields).

This is the code in the implementation of hook_menu() that defines the callback for the page containing the form.

function myModule_menu() {
  $menu['user/signup'] = array(
    'title' =&gt; 'Signup',
    'description' =&gt; 'Sign Up',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('myModule_signup'),
    'access callback' =&gt; TRUE,
  );

    /// Others
}


The rest of the code is the following one.

function myModule_signup($form, &amp;$form_state) {
  $form['user_email'] = array(
    '#type' =&gt; 'textfield',
    '#size' =&gt; 15, 
    '#required' =&gt; true
  );

  $form['user_name'] = array(
    '#type' =&gt; 'textfield',
    '#size' =&gt; 15,
    '#required' =&gt; true
  );

  $form['user_passwd1'] = array(
    '#type' =&gt; 'password',
    '#size' =&gt; 15,
    '#required' =&gt; true
  );

  $form['user_passwd2'] = array
        (
    '#type' =&gt; 'password',
    '#size' =&gt; 15,
    '#required' =&gt; true
  );

  $form['user_gender'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array('male', 'female')
    // '#size' =&gt; 15,
    // '#required' =&gt; true
  );

  $form['user_age'] = array
        (
    '#type' =&gt; 'select',
    '#options' =&gt; range(18, 26),
    // '#size' =&gt; 15,
    // '#required' =&gt; true
  );

  $form['user_country'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array('Bangladesh', 'USA'),
  );

  $form['user_state'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array('Dhaka', 'Chittagong', 'Mymensing'),
  );

  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Sign Up')
  );

  return $form;
}

function myModule_signup_validate($form, &amp;$form_state) {
  $formValues = $form_state['values'];
  if (empty($formValues['user_email'])) {
    form_set_error('user_email', t('Email can not be empty'));
    dsm('I can see this message...');
  }
}


And I'm also calling &lt;?php print $messages; ?&gt; in my custom theme's page.tpl.php file.
I  made a  quick test module using your code, and I was also not getting any error messages.  The error message problem was solved when I added '#title' fields to each of the elements in your form array.  Drupal is using those to figure out what messages to display.

The reason form_set_error message isn't getting set is because drupal displays at most one error message per field, and it is already detecting that the user_email field is required and setting its own error message because of that.  If you want additional validation, you'll have to check for more than just the existence of the field, and also pass in some malformed data.