Could you just use the native is_int() function instead? Also, you can actually use the CI Form_validation methods if you load the library and then for the function pass the object and method as an array like so: $this->validator->add_rule('my_field', array($this->form_validation, 'integer', 'Please enter in an integer value')
Comments
$this->validator->add_rule('my_field', array($this->form_validation, 'integer', 'Please enter in an integer value')
$this->validator->add_rule('my_field', array($this->form_validation, 'integer'), 'Please enter an integer value');
I tried to copy and paste your code to see if it worked but it didn't, just thought i try to sort things out on this tread for future reference.
thanks!