Drupal: customizing validation error messages

老子叫甜甜 提交于 2019-12-23 20:12:53

问题


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:


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.



来源:https://stackoverflow.com/questions/4830379/drupal-customizing-validation-error-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!