2
votes

How do I properly validate a submitted form? I've been looking in the documentation on http://kohanaframework.org/3.3/guide/orm/validation and http://kohanaframework.org/3.3/guide/kohana/security/validation, the latter also tells me "This page needs to be reviewed for accuracy by the development team. Better examples would be helpful."

What I'm trying to achieve is registering a User (the Auth module) I'm not quite sure which one too use and why.

1
The first link you posted contains examples on how to validate models. What more are you looking for? - badsyntax
I'm not really sure what you mean? My question is stated, "How do I properly validate a submitted form?" And then I've provided some links that are quite unclear - because the content examples provided are not working, lastly I state that I tend to use the Auth module. - user1831020
Validation rules are set in models. When you try to register (create) a new user, validation exceptions will be thrown if there are errors, and you need to catch the exceptions to display the errors. The action_create method shows the general method of doing this. What part of that do you need clarification on? - badsyntax

1 Answers

2
votes

http://kohanaframework.org/3.3/guide/orm/validation This is how you validate your models

http://kohanaframework.org/3.3/guide/kohana/security/validation And that's how you validate the user input.

I have used both in a few projects after reading the examples on above links and everything worked pretty much fine.