• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Message don't display

#1
[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

#2
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.