Welcome Guest, Not a member yet? Register   Sign In
Storing negative values in MySQL
#5

[eluser]flaky[/eluser]
since myself am not a very good regex guy I'd use callback functions from form validation class
eg
Code:
public function is_negative_float($number){
    if((float)$number && $number < 0)
        return true;
    else{
        $this->form_validation->set_message('is_negative_float', 'Enter only negative float numbers!');
        
        return false;
    }
}


Messages In This Thread
Storing negative values in MySQL - by El Forum - 01-15-2010, 03:39 PM
Storing negative values in MySQL - by El Forum - 01-15-2010, 05:16 PM
Storing negative values in MySQL - by El Forum - 01-15-2010, 05:17 PM
Storing negative values in MySQL - by El Forum - 01-15-2010, 05:23 PM
Storing negative values in MySQL - by El Forum - 01-16-2010, 02:30 AM
Storing negative values in MySQL - by El Forum - 01-16-2010, 04:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB