I think there is a bug in codeigniter form validation class.
My code is working perfectly fine if value is greater than zero but if it's "0" set_value function is not working:
Controller:
$this->form_validation->set_rules('age', 'Age', 'required|is_natural');
View:
<? if(set_value('age')) { ?>
<input id="age" name="age" type="text" value="<?=set_value('age')?>" />
<? } else { ?>
<input id="age" name="age" type="text" value="Age" />
<? } ?>
Am i doing something wrong or is this a bug ?