Error Message don't display - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Error Message don't display (/showthread.php?tid=56332) |
Error Message don't display - El Forum - 12-11-2012 [eluser]ricmen[/eluser] Hi everyone, I coded a custom validation, the validation is working but the error message is not displaying , I checked the code and the set_message has the same name as the function. Here is my code function isUserPage_Unique($PageID, $UserID) { $isUserPage = $this->UserPage->getByUserIDPageID($UserID, $PageID); if(count($isUserPage) > 0) { $this->form_validation->set_message('isUserPage_Unique', 'The %s can not be 0'); return false; } else { return true; } } Regards and Thanks for your time Error Message don't display - El Forum - 12-11-2012 [eluser]Aken[/eluser] It looks backwards? You check if the count is greater than zero, and if it IS, you throw an error saying it can't be zero. |