[eluser]Mirge[/eluser]
After MUCH headache... I decided to revisit the previous URL and re-try the code.
It still didn't work.
I started tracing through it... and the example shows you're supposed to invoke a callback method in the MODEL via:
callback_
methodname_model[modelname]
So, I continued tracing through the code... echo statements & what not. Then I discovered that $rule was NOT saving the [modelname] portion.
Seconds later, I found the regular expression:
Code:
if (preg_match("/(callback_\w+)/", implode(' ', $rules), $match))
needless to say, I let out a sigh of relief. \w won't match brackets.
I changed the regex to:
Code:
if(preg_match("/(callback_[\w\[\]]+)/", implode(' ', $rules), $match))
And it's now calling the correct validation method within the model specified. All is right with the world again.
Figured I'd share... since the only forum results I could find via searching were not helpful. Hopefully this saves somebody else the hassle/headache.