Hi there, i am creating a validator for a number input. But, if the input is empty, it will still return true. How can i do it ?
The current code is like this :
$rank = new Text("rank");
$rank->setLabel("Rank");
$rank->addValidators(array(
new Numericality(array('message' => 'Rank must be a number'))
));
Thanks in advance :)