[eluser]Sumon[/eluser]
using a custom validation may be a good choice. by example in form_validation.php add a validation rule
Code:
$this->form_validation->set_rules('sel_sex', 'sex', 'required|callback_check_sex');
and the function check_sex code
Code:
function check_sex()
{
$valid_selections = array('m','M','f','F');
$x = $_POST['sel_sex'];
if(in_array($x , $valid_selections))
{
return true;
}
else
{
$this->form_validation->set_message('check_sex', 'invalid choice');
return FALSE;
}
}