Welcome Guest, Not a member yet? Register   Sign In
Is this a bug or a design decision?
#1

[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.


Messages In This Thread
Is this a bug or a design decision? - by El Forum - 09-21-2014, 09:02 PM
Is this a bug or a design decision? - by El Forum - 09-22-2014, 08:55 AM
Is this a bug or a design decision? - by El Forum - 09-22-2014, 04:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB