translation doesn't work with second field name in "matches" validation rule |
[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.
[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.
[eluser]Benedikt[/eluser]
<code> $rules[] = array( 'field' => 'Password', 'label' => 'langassword', 'rules' => 'trim|required|matches[Password2]' ); $rules[] = array( 'field' => 'Password2', 'label' => 'langassword2', '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>
[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.
[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...
[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)
[eluser]Benedikt[/eluser]
Now it's working!! Thanks. But where did you get this version from? Is it 1.7.2?
[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
[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. |
Welcome Guest, Not a member yet? Register Sign In |