form_set_error not showing error message on webform I have created my own module and when i try to use form_set_error all im getting is the red border around the form input but no error message.

here is my code

function dd_alert_register_form_alter(&amp;$form, &amp;$form_state, $form_id)
{
    if($form_id === 'webform_client_form_123'){
        $form['#validate'][]='dd_alert_register_form_validate';     
    }
}

function dd_alert_register_form_validate($form,&amp;$form_state)
{
    //where "phone" is field name of webform phone field
    $email = $form_state['values']['submitted']['email_address'];

    if ((bool) db_select('users')-&gt;fields('users', array('uid'))-&gt;condition('mail', db_like($email), 'LIKE')-&gt;range(0, 1)-&gt;execute()-&gt;fetchField()) {
        form_set_error('submitted][email_address',t('The e-mail address is already registered'));
        return $form;
    }
    // Then use regular expression to validate it.
    // In above example i have check if phonefield is empty or not.
}
I think it could also happen if $messages haven't printed in the page.tpl.php in your theme.

Is the &lt;?php print $messages; ?&gt; included in your page.tpl.php file?

Check this line in your page template. You might have missed it.

Hope it will help you!