Kohana 3: Example of model with validation

Posted by Svish on Stack Overflow See other posts from Stack Overflow or by Svish
Published on 2010-03-17T12:37:50Z Indexed on 2010/03/17 12:41 UTC
Read the original article Hit count: 496

Filed under:
|
|
|

I find examples and tutorials about models and about validation. And I places that say the validation (or most of it at least) should be in the model, which I agree with. But I can't any examples or tutorials that show how that should be done.

Could anyone help me with a simple example on how that could be done? Where would you have the rules in the model? Where would the validation happen? How would the controller know if the validation passed or fail? How would the controller get error messages and things like that?

Hope someone can help, cause feel a bit lost here :p

© Stack Overflow or respective owner

Related posts about kohana-3

Related posts about model