little change js

This commit is contained in:
Marion Muszynski 2017-01-18 15:37:17 +01:00
parent 04cf9600d1
commit 545e6afa55

View File

@ -970,15 +970,19 @@ $(document).ready(function () {
return (false);
}
if (!(phone_mobile.test($('#custPhone').val())
|| phone_mobile_be.test($('#custPhone').val())
|| phone_mobile_es.test($('#custPhone').val())
|| ($('#custPhone').val().length == 9 && $('#custPhone').val().charAt(0) == 6)
if ($('#custPhone').val().length >= 10 &&
!(
phone_mobile.test($('#custPhone').val())
|| phone_mobile_be.test($('#custPhone').val())
)
) {
ev.preventDefault();
alert($('#error-mobile-invalid').val() + '\n\nFormat : 0661010203');
return (false);
ev.preventDefault();
alert($('#error-mobile-invalid').val() + '\n\nFormat : 0661010203');
return (false);
} else if($('#custPhone').val().length == 9 && !phone_mobile_without_zero.test($('#custPhone').val())){
ev.preventDefault();
alert($('#error-mobile-invalid').val() + '\n\nFormat : 0661010203');
return (false);
}
return (true);