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

[eluser]ajsie[/eluser]
according to this article:

http://www.phpandstuff.com/articles/code...ignup-form

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

function[field]

and

callback_function

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

[eluser]dejitaru[/eluser]
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