Merge branch 'ticket-12392-fixItalianNumber'

This commit is contained in:
Marion Muszynski 2017-01-30 10:35:47 +01:00
commit 549cbfa145

View File

@ -960,7 +960,7 @@ $(document).ready(function () {
var phone_mobile_be = /^((\+|00)32\s?|0)4(60|[789]\d)(\s?\d{2}){3}$/i;
var phone_mobile_without_zero_be = /^4(60|[789]\d)(\s?\d{2}){3}$/i;
var phone_mobile_es = /^((\+|00)34\s?|0)[67](\s?\d{2}){4}$/i;
var phone_mobile_es = /^((\+|00)34\s?\d{1}|6)(\s?\d{2}){4}$/i;
var phone_mobile_it = /^(((\+|00)39\s?[03])|[03])(\s?\d{1}){9}$/i;
@ -1004,11 +1004,7 @@ $(document).ready(function () {
}
if($('#sl-0-country').val() == 'ES'){
if($('#custPhone').val().length == 9 && !(phone_mobile_without_zero.test($('#custPhone').val()))){
ev.preventDefault();
alert($('#error-mobile-invalid').val() + '\n\nFormat : 610102031 ou 0034610102031');
return (false);
}else if($('#custPhone').val().length > 9 && !(phone_mobile_es.test($('#custPhone').val()))) {
if(!(phone_mobile_es.test($('#custPhone').val()))) {
ev.preventDefault();
alert($('#error-mobile-invalid').val() + '\n\nFormat : 610102031 ou 0034610102031');
return (false);