CodeIgniter Forums
translation doesn't work with second field name in "matches" validation rule - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: translation doesn't work with second field name in "matches" validation rule (/showthread.php?tid=18713)

Pages: 1 2


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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.


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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.


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

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


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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>


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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.


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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...


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

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


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

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

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


translation doesn't work with second field name in "matches" validation rule - El Forum - 12-13-2009

[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


translation doesn't work with second field name in "matches" validation rule - El Forum - 01-03-2010

[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.