Added Model->getErrorMessages function.