Welcome Guest, Not a member yet? Register   Sign In
Form validation
#4

[eluser]McNoggin[/eluser]
If you are worried about the overhead from the function calls to set_rules you could always do that check yourself in the controller.

if (count($_POST) > 0) {
set_rules(...)
}

That way you are only doing count($_POST) once for an empty form instead of each rule. On the other hand for a form with data it will add an extra call to it.


Messages In This Thread
Form validation - by El Forum - 11-07-2008, 12:21 AM
Form validation - by El Forum - 11-07-2008, 01:06 AM
Form validation - by El Forum - 11-07-2008, 01:07 AM
Form validation - by El Forum - 11-07-2008, 01:12 AM
Form validation - by El Forum - 11-07-2008, 01:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB