[eluser]RobertSF[/eluser]
Before version 2.2.0, the following code worked --
Code:
$this->form_validation->set_rules('login', 'Login', 'required | is_unique[users.login]');
Now it doesn't. What's the problem? The spaces surrounding the pipe symbol. For it to work in 2.2.0, it must be --
Code:
$this->form_validation->set_rules('login', 'Login', 'required|is_unique[users.login]');
Otherwise, the rules won't run and you'll get an error message in your log file. That's because Codeigniter isn't trimming the rules, so there's no valid rule called "required " and there's no valid rule called " is unique."
I consider it a bug. There's no good reason to prohibit white space.