Hi. How do I call a method from another class for the ValidationServerFunction? The standard way in php to call a callback function is array( $class_object, 'class_method' ). But this doesn't work. Nor does "$class_object->class_method". Not sure what to do here. Any help would be greatly appreciated.
Manuel Lemos - 2012-04-20 08:21:37 - In reply to message 1 from Larry Pack
You may try calling a static function of that class.
If that would not do, maybe you can create a plug-in class that implements that kind of validation you want. That can handle both server and browser side validation if you need that too. Take a look at the test_custom_validation.php example script.
Larry Pack - 2012-04-20 08:44:21 - In reply to message 3 from Larry Pack
Hi again. Calling a static method doesn't work. However, if you modify line 3396 of forms.php to read
you can then call static functions.
Manuel Lemos - 2012-04-21 21:00:56 - In reply to message 4 from Larry Pack
Yes, you are right. I made the class use call_user_func instead, so it works with classes static functions, object class functions, or even closures. It will be made available in the next release. Thank you for the suggestion.