Welcome Guest, Not a member yet? Register   Sign In
how to use form validation to compare date? - if not possible accept a parallel solution.
#3

[eluser]Spectruman[/eluser]
[quote author="Kamarg" date="1271455255"]Callback functions as explained in the user guide seem to be just what you're looking for.[/quote]

understand the function, the problem is how to pass all parameters to the function you want. For the tutorial I call only for item validation. as in the example:

Code:
$ this-> form_validation->set_rules('username', 'Username', 'callback_username_check');
I can not use this scheme

Code:
$ This-> form_validation->set_rules('dateStart', 'Start Date', 'trim|required|callback_compareDataTime');
$ This-> form_validation->set_rules('dateEnd', 'Date endFim', 'trim |required|callback_compareDataTime');
$ This-> form_validation->set_rules('timeStart', 'Start Time', 'trim|required|callback_compareDataTime');
$ This-> form_validation->set_rules('timeEnd', 'End Time', 'trim|required|callback_compareDataTime');
so I'll just grab a parameter. I need to pass all the parameters of the function to test and return the message according to the function's return


Messages In This Thread
how to use form validation to compare date? - if not possible accept a parallel solution. - by El Forum - 04-16-2010, 11:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB