[eluser]itsme[/eluser]
I found that the current matches method in form_validation library does not support fields with multidimensional
array as a name so i edited the method to support it, i hope it will help you in the future
The new method is :-
Code:
public function matches($str, $field)
{
if(strpos($field,"]"))
{
list($arr_name,$field_name)=explode("[",$field);
$field_name=substr($field_name,0,-1);
if ( ! isset($_POST[$arr_name][$field_name]))
{
return FALSE;
}
$field = $_POST[$arr_name][$field_name];
}
else {
if ( ! isset($_POST[$field]))
{
return FALSE;
}
$field = $_POST[$field];
}
return ($str !== $field) ? FALSE : TRUE;
}