[eluser]Cgull[/eluser]
Hello,
I have a form with an input field:
Code:
$espresso = array('name'=>'espresso', 'size'=>'1', 'maxlength'=>'3', 'value'=>set_value('espresso'));
In my controller I have this validation rule:
Code:
$this->form_validation->set_rules('espresso', 'Qty', 'trim|numeric');
I put a letter in the espresso field, submit the form and I don't get any error.
If I try this rule:
Code:
$this->form_validation->set_rules('espresso', 'Qty', 'trim|required');
I get a nice beatiful error that the field is required.
Why don't I get the error for the numeric rule?
Thanks