CodeIgniter Forums
Validation Class and more then one callback functions on the same field? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Validation Class and more then one callback functions on the same field? (/showthread.php?tid=15779)



Validation Class and more then one callback functions on the same field? - El Forum - 02-14-2009

[eluser]felyx[/eluser]
Well I tried to apply two validation callback methods for the same form field but it just won't execute the second one. Tryed to exchange them with each other and the first always works second doesn't. Am I doing something wrong?

Edit: if it is not avaible and you won't make it avaible then the documentation should say something about it, so ppl won't run into this problem Smile


Validation Class and more then one callback functions on the same field? - El Forum - 02-14-2009

[eluser]pistolPete[/eluser]
Seems to be a CI bug: CI 1.7 form_validation bug regarding callbacks

But do you need to call multiple callbacks? Isn't it possible to put the validation in one callback function?


Validation Class and more then one callback functions on the same field? - El Forum - 02-14-2009

[eluser]felyx[/eluser]
[quote author="pistolPete" date="1234679269"]Seems to be a CI bug: CI 1.7 form_validation bug regarding callbacks

But do you need to call multiple callbacks? Isn't it possible to put the validation in one callback function?[/quote]

Sadly no, I need to use callback validation at editing the data and adding the data but I only need two callbacks at the adding page. So It means duplicated code atm since I need 1 callback for the edit page only and a combined one from the two callbacks for the adding page.


Validation Class and more then one callback functions on the same field? - El Forum - 02-14-2009

[eluser]pistolPete[/eluser]
I submitted a bug report, let's see what's happening Smile


Validation Class and more then one callback functions on the same field? - El Forum - 02-14-2009

[eluser]felyx[/eluser]
[quote author="pistolPete" date="1234680266"]I submitted a bug report, let's see what's happening Smile[/quote]

Well I hope they will fix it but until then I will work around the problem. Thanks for the help. Smile