Welcome Guest, Not a member yet? Register   Sign In
Callbacks: Your own Validation Functions
#1

it can only call public functions in Form Validation. can not call private function.
is it a bug?
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply
#2

can you post an example

Reply
#3

It's not a bug - it's a feature ;)

Try to use CI private function as workaround:
PHP Code:
public function _my_callback() {} 
Reply
#4

IMHO in use Callbacks Form Validation is a bad practice and it doesn't make any sense. Better extends the Form Validation Library and create your own validation rules.
Reply
#5

(10-21-2014, 07:51 PM)startbbs Wrote: it can only call public functions in Form Validation. can not call private function.
is it a bug?

Private functions can only be called by the class that declares them and this has nothing to do with CodeIgniter.
Reply
#6

(10-22-2014, 01:28 AM)tirta Wrote: IMHO in use Callbacks Form Validation is a bad practice and it doesn't make any sense. Better extends the Form Validation Library and create your own validation rules.

I agree with you
Reply




Theme © iAndrew 2016 - Forum software by © MyBB