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

[eluser]phpfresher[/eluser]
I also having the similar problem in password and confirm password field . But i solve it in a different way.
User the callback function .
Code:
$this->form_validation->set_rules('espresso', 'Qty', 'trim|numeric');
to

Code:
$this->form_validation->set_rules('espresso', 'Qty', 'trim|callback_numeric_check');  

function numeric_check($num){
if(!isset($num)){
   return false;
}
perform the numeric check .. or paste the code from form_validation library into it.
}

But it is not the actual solution but its the last solution. Actually numeric would work. But in case if you cant solve the problem follow the above approach.


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