Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal: customizing validation error messages

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

like image 876
Cris Avatar asked Jun 03 '26 23:06

Cris


1 Answers

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.

like image 171
Matt V. Avatar answered Jun 06 '26 07:06

Matt V.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!