custom validation returns error always |
I have a custom validator that returns error always.
class myValidation extends CI_Form_validation { /** * myValidation:: */ function fieldvalueisok($value){ //validates value against illegal entries such as "xxx" $bannedValues=array('a','b','c'); if(in_array(strtolower($value),$bannedValues)){ return false; } return true; } } Even if i return true everywhere, in a blank function etc, still i get an error from it. What am I missing? Please i wanna know more than the method above..the above is just an eg.
This is not the proper way to extend native libraries. Notice what they name theirs. I don't think your extended class is even being loaded since it's named improperly.
https://codeigniter.com/user_guide/gener...-libraries
MY_Form_validation {
} What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |