Welcome Guest, Not a member yet? Register   Sign In
Consult: How to compare time field using form validation
#9

[eluser]TheFuzzy0ne[/eluser]
You haven't passed the expected parameter to the validation method via your rule, so the method gets an empty string.

Code:
$this->form_validation->set_rules(‘end_time’, ‘End Time’, ‘required|time_check['.$this->input->post('start_time.']’);

But as I mentioned before, you should also check to make sure that the string being passed is in the format you are expecting it to be in. This is the whole point of validation.

Alternatively, you can reference $this->input->post('start_time') from within your validation method, rather than passing it as a rule argument.



Messages In This Thread
Consult: How to compare time field using form validation - by El Forum - 03-05-2013, 12:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB