Why my custom rule always return true? My Controller:
class Controller_Users extends Controller {
public function action_func() {
if ($_POST) {
$validation = Validation::factory($_POST);
$validation->rule('field', 'Test::func', array(':value'));
$check = $validation->check(); // always true
}
}
}
And class Test:
class Test {
static public function func($value) {
return false;
}
}
Clearly indicated - false. But ->check()
returns true. Why? And how to fix it?