As an alternative way (if you don't want to hack core), you could use callback validators instead. Then your code will look like: $post->callback('state', array($this, 'doesStateExist')); $post->callback('email', array($this->userModel, 'doesEmailExist')).
Yeh, I considered this too, but I didn't want to clutter the controller when I have gotten a way similar to above working in Kohana 2.3 – alex Feb 24 '10 at 10:33 I'm curios about this as well. Technically it should work, right? Assigning errors manually?
Isn't that what Validation::error() is for. – Jason Lewis Jun 5 at 15:37 @Jason It seems it is for adding errors after $validate->check(). But I'd rather add them before hand so I can have the check() fail.
– alex Jun 5 at 23:20.
You should always run $validate->check() before doing your own checks and adding errors. Meze's answer would be better.
Thanks for stopping by shadowhand and giving an authoritative answer. Got a whole lot of questions tagged kohana-3, but I think most have good answers now. – alex Mar 1 '10 at 13:59 Actually, if I call $validate->check() before adding my own errors, how can I something like this?
If ($post->check()) { // succeed } Perhaps I'm missing something... – alex Mar 1 '10 at 14:02.
The data is then validated... If it's not I assume the Validation Class in Kohana throws an Exception. And then try-catch function catches it. It is called even if the data is not valid.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.