[eluser]B___[/eluser]
Hello:
This may have been already covered or may be ridiculously obvious, so I apologize in advance for either case.
I am experimenting with the new Form Validation class (which I love so far). Is there an easy way to display the labels that are defined in the $config array when setting rules? I had thought of just passing the $config to the view, but then wouldn't know how to access the label value by specifying the field value.
ie: given the following:
$config = array(
array(
'field' => 'username',
'label' => 'Username',
'rules' => 'required'
),
array(
'field' => 'password',
'label' => 'Password',
'rules' => 'required'
));
how would one access the label Username by specifying the field username.
I didn't see this ability anywhere in the manual, but thought it wouldn't be too hard to write a helper function to do this.
Any suggestions? Thanks in advance!