public function index03Action() { echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>"; $validator = new \Zend\Validator\Digits(); $input = "1"; //ok $input = -1; //not $input = 0; //ok if (!$validator->isValid($input)) { $message = $validator->getMessages(); echo current($message); } else { echo "ok"; } return false; }