Welcome Guest, Not a member yet? Register   Sign In
Problem with lang: syntax in form_validation (SOLVED)
#1

[eluser]James Gifford[/eluser]
I am using the new form_validation library and I can't get the new shortcut syntax for field translations to work.

Here's what I'm trying to do:
Code:
$this->lang->load('login');
$this->load->library('form_validation');
$this->form_validation->set_rules(array(
   array('field' => 'username',    'label' => 'lang:username', 'rules' => 'required'),
   array('field' => 'password',    'label' => 'lang:password', 'rules' => 'required')));
if ($this->form_validation->run())
...

This results in the fields being named 'lang:username' and 'lang:password' respectively. If I replace the shorthand syntax with something like $this->lang->line('username') then it works just fine.

Is anyone else having problems with this aspect of the form_validation library? Or is there some setting or something that I missed?


Messages In This Thread
Problem with lang: syntax in form_validation (SOLVED) - by El Forum - 11-06-2008, 06:19 PM
Problem with lang: syntax in form_validation (SOLVED) - by El Forum - 11-06-2008, 06:31 PM
Problem with lang: syntax in form_validation (SOLVED) - by El Forum - 11-06-2008, 06:43 PM
Problem with lang: syntax in form_validation (SOLVED) - by El Forum - 11-06-2008, 08:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB