![]() |
Cascading Validation callbacks not all being called - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cascading Validation callbacks not all being called (/showthread.php?tid=8539) |
Cascading Validation callbacks not all being called - El Forum - 05-21-2008 [eluser]Kepi[/eluser] I have a custom Validation callback that is a variation on the built-in 'required' rule. Specifically, if the form field the callback is being called on has a value, then the form field specified as the parameter to the callback must also have a value. It all works great, but I'm having an issue where the cascading nature of the rules doesn't seem to hold up. Part of the form has what could be considered line items with three fields each. I use the callback to ensure that if one of those three fields of a given line item has a value, the other two do as well. The rules are set up as follows (code simplified for readability): Code: $rules["fieldOne"] = "callback_blah[fieldTwo]|callback_blah[fieldThree]"; It seems the callbacks don't cascade beyond a 'true' result. Am I setting something up incorrectly, or does the cascading rule functionality not support what I'm attempting to do? Cascading Validation callbacks not all being called - El Forum - 05-22-2008 [eluser]saiprasad.ch[/eluser] Yes ! the callbacks don’t cascade beyond a ‘true’ result. Thats really a weird thing in the validations.... |