I’ve noticed a bug that occurs with the validation class in a PHP 4 environment.
If $this->load->library(validation) is placed in the controller’s constructor (which is where I like to place it so that views don’t throw an undefined notice when loaded for the first time), then the validation->error_string is empty in the view on validation failure. In the controller, the error_string is correctly initialized, but it loses itself when the the view is reloaded.
Switching to PHP 5 solves the problem. It probably has something to do with the piss-poor object referencing of PHP 4, but I haven’t confirmed for sure.
If you must use PHP 4, simply putting $this->load->library(validation) into every controller method that uses the view will solve the problem…except for the duplicate code.
