how to display error messages below the fields ?
I use hook_form and hook_validate.
if ($test===FALSE){
form_set_error('test', 'message');
}
Use Inline Form Errors module.
IFE or Inline Form Errors allows you to place form submission error inline with the form elements. Three options are provided for setting your inline error behaviour. You can configure the default behaviour or override the behaviour on a per form basis. You can add as many forms as you like.