Cant display error message in custome form! I have create one form which have two fields.

$form['name'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Name'),
    '#maxlength' =&gt; 20,

    '#required' =&gt; TRUE,

);
$form['phone'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Phone'),
    '#maxlength' =&gt; 20,
    '#required' =&gt; TRUE,
);


In page.tpl.php file displayed both fields. Now i have press submit button without enter any value in text box error message will displayed.

But in my page.tpl.php file cant display error message!

How can i show all error message?
Hope this will help you.

In Drupal 7, just add this line in your custom template file

&#60;?php if ($messages): print $messages; endif; ?&#62;