[eluser]Unknown[/eluser]
Hello- I've been looking around the forum and I'm sure the answer to my problem is in here somewhere but I just can't find it. I have the following, leaving out (I think) code that isn't really necessary to the general idea, set up to see if I could get anything at all to load from my extended library- I cannot... It seems to me that this should just stop the form cold- but it doesn't, it submits every time:
system/libraries/MY_form_validation.php
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation {
function MY_Form_validation() {
parent::CI_Form_validation();
}
function test_my_function() {
return false;
}
}
system/application/controllers/signup.php
Code:
<?php
class Signup extends Controller {
function Signup() {
parent::Controller();
$this->load->library('form_validation');
}
function index() {
$this->form_validation->set_rules('email', 'Email Address', 'test_my_function');
if ($this->form_validation->run() == FALSE) {
$this->load->view('signup_view', $data);
} else {
// here's where stuff happens as a result of filling out the form, probably not important- it works...
$this->load->view('submit_view', $display);
}
}
I've tried 4 or 5 different functions inside MY_form_validation.php, nothing I do seems to call them into my controller... am I missing something really obvious?
thanks in advance-