How can I set a form error to body fields summary textarea?
I tried this:
form_set_error('body', 'Error message.');
But body AND summary got the red border indicating errors.

I tried this:
form_set_error('summary', 'Error message.');
But none body nor summary got the red border indicating errors.

I tried a lot ot things but never get it working. How can I set an error for these two fields separately?

Comments

edgarpe’s picture

Ohhh maaan, I got it.
Its like this:

// Body error
form_set_error('body][und][0][value', 'Error msg.');
// Summary error
form_set_error('body][und][0][summary', 'Error msg.');