Vote up!
Vote down!

Customizing/changing error messages in a pane


By default, when a field is required, it shows the error message !name field is required. I want to change that but I can't seem to do it through how I would normally do it. That is go through drupal error messages and replace the error message in question.

When I try to do that, the error would show up on top of the page instead of on top of the pane where the field in question is located. Also, the error message is also still there.

Has anyone tried to customize an error message in a pane before?

Asked by: akosipax
on July 17, 2013

1 Answer

Vote up!
Vote down!

Finally got it.

What I've been doing wrong is trying to replace the message in an #element_validate function. I replaced the message in a #validate function and it now works.

Answer by: akosipax
Posted: Jul 18, 2013