Welcome Guest, Not a member yet? Register   Sign In
Split the form_validation to 2 parts
#4

[eluser]eranbe[/eluser]
Thanks for the answer.

I don't want to get the callback function's error message if the user did not entered mandatory field.
I don't even want to waist time to check in the DB.

As for the solution you offered, it's good but this way I'll have to add more code to my view (to deal with the data array)

So just for the others who might read this tread,
I tried the code I wrote above and it worked fine.

If any mandatory fields are missing, I get error messages only for them.
only if the first validation pass, I re-set the rule for my callback function and check form_validation->run() again.


Messages In This Thread
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 08:04 AM
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 08:09 AM
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 08:18 AM
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 08:39 AM
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 09:15 AM
Split the form_validation to 2 parts - by El Forum - 01-29-2013, 04:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB