[eluser]bondjp[/eluser]
I'm trying to validate a checkbox but i'm not getting the message when i don't select the checkbox.
Can someone please help me on this one?
Thanks
Here's my code:
Code:
$this->form_validation->set_rules('terms','','required');
View
<tr>
<td colspan="2"> <?php echo form_checkbox('terms','0', false);?> I certify that I am at least 18 years old, and I agree to the <?php echo anchor("terms","Terms of Use");?> </td>
</tr>
<tr>
<td style="color: red;"><?php echo form_error('terms'); ?></td>
</tr>