[eluser]Yednotek[/eluser]
When form validation involves 2 fields (like matches['passconf'] in the userguide example) then the 2nd field reference in the error message contains the formfield id instead of the label.
Example:
Code:
$rules_config=array(
array(
'field'=>"user_password",
'label'=>"Wachtwoord",
'rules'=>"required|min_length[6]|max_length[16]|md5|matches['user_password2']"
),
array(
'field'=>"user_password2",
'label'=>"Wachtwoord check",
'rules'=>"required|md5"
)
);
$this->form_validation->set_message('matches',"Fields '%s' and '%s' don't match.");
Produces the error message:
Fields '
Wachtwoord' and '
user_password2' don't match.
Where expected behaviour would be:
Fields '
Wachtwoord' and '
Wachtwoord check' don't match.