Iron giant Posted July 15, 2014 Share Posted July 15, 2014 hello guys, I am facing a problem regrading my module. I have a module which add a extra tab in product. In this tab i have a field. I want to display an error message when user enters wrong data in that field now, if(!empty($sampleObj) && isset($sampleObj->id)){ $sampleObj->update(); } in this above condition , i want to check validation first and then this update() function to execute. Right now please help me what to write in this braces to check the validation? for example if(!empty($sampleObj) && isset($sampleObj->id)){ if($sampleObj->text=='Hello') { /* What to write here for displaying error message and data will not be saved ????? */ } else { $sampleObj->update(); } } Please HELP....... Thank you Link to comment Share on other sites More sharing options...
Recommended Posts