In Zend Framework,I am validating user supplied data in my model class something like
public function valiateRegisterForm($regisInfo)
{
//validating with zend_filter_input which on failure returns array of arrays i.e
//(error code to array of error messages)
}
Right now i have create one more method getErrorMessage() to let controller to fetch error message from model but then i have to create this method in my every model class which will lead to redundancy,so should i create another object like ErrorManager?
To me it seems like as if am just not following things in proper way
please suggest some good method to handle error in zend framework.