Welcome Guest, Not a member yet? Register   Sign In
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.




Theme © iAndrew 2016 - Forum software by © MyBB