[eluser]Mirge[/eluser]
[quote author="CroNiX" date="1353538121"]You don't really need to do that in validation. You can cast it to an int.
Code:
$number = (int)$this->input->post('number_field');
If number_field doesn't exist in CI's post array, $number will be 0 because the value will be boolean FALSE which is int(0) and the same with an empty string.[/quote]
Unless I misunderstood, he just explained that it won't always be "0" and is looking for more flexibility.