T.Baron Posted December 8, 2015 Share Posted December 8, 2015 (edited) Hello, When I put my postcode in the adress creation page, it gets a red border with a red cross, even if it's correct. I tried to search for the reason, and the only related function I found is function validate_isPostCode(s, pattern, iso_code) in /www/js/validate.js, but when I changed the return value to be always true, it kept telling me my postcode was incorrect. I'm litterally helpless on this one. Here is the html code for this field : <input class="is_required validate form-control uniform-input text" data-validate="isPostCode" id="postcode" name="postcode" value="" type="text"> Does anyone here knows where this check is done ? How I can correct it ? Edit : I already set my postcode to be NNNNN in the country I'm using, and I tried combinations of 5 numbers only. Edited December 8, 2015 by T.Baron (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 9, 2015 Share Posted December 9, 2015 I found a bug in 1.6.1.1. You need to change the validate_field method. About line 190 if (typeof(countriesNeedZipCode[id_country]) != 'undefined' && typeof(countries[id_country]) != 'undefined') var result = window['validate_'+$(that).attr('data-validate')]($(that).val(), countriesNeedZipCode[id_country], countries[id_country]['iso_code']);It needs to be like this Link to comment Share on other sites More sharing options...
T.Baron Posted December 21, 2015 Author Share Posted December 21, 2015 Oh well, it didn't solve my problem, so I eventually removed the validate class from the postcode field, since I had other more important problems to get rid of. Link to comment Share on other sites More sharing options...
Recommended Posts