Hello RobbieBlokeToys,
Go to js/validate.js =>
function validate_isPostCode(s, pattern) { if (typeof(pattern) == 'undefined' || pattern.length == 0) pattern = '[a-z 0-9-]+'; else { var replacements = { ' ': '( |)', '-': '(-|)', 'N': '[0-9]', 'L': '[a-zA-Z]' }; for (var new_value in replacements) pattern = pattern.split(new_value).join(replacements[new_value]); } var reg = new RegExp('^'+pattern+'$', 'i'); return reg.test(s); }
and also go to bottom of the same file:-
$(document).on('focusout', 'input.validate, textarea.validate', function() { if ($(this).hasClass('is_required') || $(this).val().length) { if ($(this).attr('name') == 'postcode' && typeof(countriesNeedZipCode[$('#id_country option:selected').val()]) != 'undefined') var result = window['validate_'+$(this).attr('data-validate')]($(this).val(), countriesNeedZipCode[$('#id_country option:selected').val()]); else var result = window['validate_'+$(this).attr('data-validate')]($(this).val()) if (result) $(this).parent().removeClass('form-error').addClass('form-ok'); else $(this).parent().addClass('form-error').removeClass('form-ok'); } });