Welcome Guest, Not a member yet? Register   Sign In
numeric form validation does not work
#1

[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


Messages In This Thread
numeric form validation does not work - by El Forum - 04-21-2012, 07:58 AM
numeric form validation does not work - by El Forum - 04-21-2012, 11:59 PM
numeric form validation does not work - by El Forum - 04-22-2012, 03:32 AM
numeric form validation does not work - by El Forum - 04-23-2012, 03:53 AM
numeric form validation does not work - by El Forum - 04-23-2012, 04:25 AM
numeric form validation does not work - by El Forum - 04-23-2012, 05:40 AM
numeric form validation does not work - by El Forum - 04-23-2012, 06:50 AM
numeric form validation does not work - by El Forum - 04-23-2012, 12:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB