General developer forum

Recover error array after form validation failure

 
Picture of Matthew Davidson
Recover error array after form validation failure
Core developersPlugin developers

The plugin I'm working in is returning errors.  The forms tend to be very long and so I would like to post a message at the top of the page listing any errors.  If I print_r() the $mform object,  I can see the error messages that are shown per form element, but they are protected.  How can I get these error messages once the validation has failed?

 
Average of ratings: -