Drupal: customizing validation error messages

2019-07-16 13:28发布

when the user submits a custom CCK form and a field marked as REQUIRED is empty, i get a "xyz field is required.". How can i customize this message without modifying core modules?

Thanks and greetings c.

1条回答
看我几分像从前
2楼-- · 2019-07-16 13:51

Depending on the error message and how you need to change it, you may be able to use the String Overrides module to replace the string used to generate the message.

Another option is to create a custom module that overrides the validation function for a particular form or field, replacing any error messages with the messages of your choosing.

查看更多
登录 后发表回答