Skip to main content
removed "Drupal" and tags from the title
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Change form validation error messages in Drupal 7

Tweeted twitter.com/#!/StackDrupal/status/342915838485094400
added 8 characters in body
Source Link
Triskelion
  • 4.9k
  • 2
  • 19
  • 23

In my theme I'm already using the hook_form_alter to customize the form fields but now I want to customize the validation error messages. After

After some research, the only way I'm finding is to write a whole separate function and custom error handling of each form field. I

I don't want to reinvent the wheel. Isn't there just a simple way to change the default form validation error so I can get away from "XYZ field is required?"

In my theme I'm already using the hook_form_alter to customize the form fields but now I want to customize the validation error messages. After some research, the only way I'm finding is to write a whole separate function and custom error handling of each form field. I don't want to reinvent the wheel. Isn't there just a simple way to change the default form validation error so I can get away from "XYZ field is required?"

In my theme I'm already using the hook_form_alter to customize the form fields but now I want to customize the validation error messages.

After some research, the only way I'm finding is to write a whole separate function and custom error handling of each form field.

I don't want to reinvent the wheel. Isn't there just a simple way to change the default form validation error so I can get away from "XYZ field is required?"

Source Link
LeoXela
  • 31
  • 1
  • 1
  • 2

Change form validation error messages in Drupal 7

In my theme I'm already using the hook_form_alter to customize the form fields but now I want to customize the validation error messages. After some research, the only way I'm finding is to write a whole separate function and custom error handling of each form field. I don't want to reinvent the wheel. Isn't there just a simple way to change the default form validation error so I can get away from "XYZ field is required?"