Welcome Guest, Not a member yet? Register   Sign In
Form validation function set as private fails
#1

[eluser]John5788[/eluser]
I am just curious about the scope of a callback function for form validation.

When I set the scope to private, the server throws a 500 error, but everything works when I have it as public. Is there a specific reason why it cannot be private?
#2

[eluser]WanWizard[/eluser]
callback functions in your controller are called by the validation class. Which is external, so the callback method must be public to be accessible..
#3

[eluser]raenk[/eluser]
I had the same issue then I found a post mentioning an underscore as prefix to make function private, but still available for the validation class.

You will have to make sure you add another underscore when calling the function on your rule: callback__your_function (double _).




Theme © iAndrew 2016 - Forum software by © MyBB