Welcome Guest, Not a member yet? Register   Sign In
translation doesn't work with second field name in "matches" validation rule
#11

[eluser]lovinglgz[/eluser]
[quote author="Benedikt" date="1260718563"]Which version do you use? This repository: http://dev.ellislab.com/svn/CodeIgniter/tags/v1.7.2/

Thanks for your reply.

EDIT: I used revision 1765 but still not working.[/quote]

The same with you, mine is revision 1765.
#12

[eluser]Benedikt[/eluser]
Not working for me.

Can anybody else confirm that the "match"-rule error message translates both field names if you use "lang:..." format?

Thanks.
#13

[eluser]liviu_holhos[/eluser]
works fine now for me
#14

[eluser]Benedikt[/eluser]
<code>
$rules[] = array( 'field' => 'Password', 'label' => 'langTongueassword', 'rules' => 'trim|required|matches[Password2]' );
$rules[] = array( 'field' => 'Password2', 'label' => 'langTongueassword2', 'rules' => 'trim|required' );
</code>

<code>
$lang['Password'] = "Password";
$lang['Password2'] = "Confirm password";
</code>

What is wrong then? In all error messages (no matching-rule here) it works, but here no.

What am I doing wrong then?

<code>
// CI Version
define('CI_VERSION', '1.7.2');
</code>
#15

[eluser]liviu_holhos[/eluser]
Code look's fine by me, maybe you didn't updated the changes for form_validation library from 1.7.3 svn (I remember geting it from github). If you don't find it I can share it with you.
#16

[eluser]Benedikt[/eluser]
Can you share it or give me the link to SVN 1.7.3? I can only find 1.7.2 and I thought its fixed in 1.7.2...
#17

[eluser]liviu_holhos[/eluser]
I uploaded it on Google Docs http://docs.google.com/Doc?docid=0Aeyc25...tZHE&hl=en
Let me know if it works when updating the library (Form_validation.php in system->Library directory)
#18

[eluser]Benedikt[/eluser]
Now it's working!! Thanks.

But where did you get this version from? Is it 1.7.2?
#19

[eluser]liviu_holhos[/eluser]
It's from a beta 1.7.3, but at this time I can't remember where I got it from, sorry.
I hardly found it last month on github somewhere, I'll leave the document publicly available for anyone having this problem.

Later edit: I think it's from cbosuna's github: http://github.com/cbosuna/codeigniter
#20

[eluser]Unknown[/eluser]
As per liviu_holhos > http://ellislab.com/forums/viewreply/682138/
This code resolves the problem, tested on my 1.7.2 framework successfully.

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB