fuel/core — Issue #752: Autoload Problem using Validation->add_callable
Author: danmatthews
Created: 2011-12-24 03:57:00+00:00
State: open

Using the methods suggested in [Validation - Classes](http://docs.fuelphp.com/classes/validation/validation.html), i created a new file and class at `fuel/app/classes/login_validation.php`, with the following (test) code:

```
public static function _validation_authenticate_user($val) {

echo 'Authenticate Ran ok';

return false;

}

public static function _validation_check_pwd($val) {

echo 'Password ran ok';

return false;

}
```

Then, to use it with a validation sequence in a controller i used:

```
$v = Validation::forge();

$v->add_callable('login_validation');
```

But i get an exception:
`InvalidArgumentException [ Error ]: Input for add_callable is not a valid object or class.`

I thought this may be a problem with my class syntax, or naming, but when i manually include the class into the controller using:
`require_once('../fuel/app/classes/login_validation.php');`

Everything works as expected.

Currently working on 1.1/master.