Welcome Guest, Not a member yet? Register   Sign In
2 ways of defining own rules in validation?

according to this article:


it seems to be 2 ways of defining an own validation rule:




what's the difference and when should you use which one?

The first method using a callback, is a function on the controller itself and the second one is extending the form_validation library. I don't know if there is a rule on using one or another. If I use only 1 specific validation rule on one controller, I use a callback but if I have a rule that many controllers use, I extend the library.

Theme © iAndrew 2016 - Forum software by © MyBB