I am having trouble extending the form validation library. I placed the code in the system library file to see if it would work there and it is. When I move it to my library file it does not prevent the form from processing on failure of the function. my file is located under the correct folder and is named MY_Form_validation.php
here is the code for the extended library:
<?php
class MY_Form_validation extends CI_Form_validation{
public function currency($str){
return (bool) preg_match('/(\-?)([0-9]+)(\.)([0-9]{2})/', $str);
}
}