summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-07-12 18:17:32 +0200
committerJules Laplace <julescarbon@gmail.com>2019-07-12 18:17:32 +0200
commitde4c08d90cfeb96c416791e8210cfdba8c7aba44 (patch)
tree19f3329fda49ebd5e18d448680889f1e1321d000 /StoneIsland/www/js
parentfacfbd84cc8374c50e8c4c9650724125d0da28a6 (diff)
intl phone number support (remove 0s and 1s from head of string)
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/lib/nav/AddressView.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/nav/AddressView.js b/StoneIsland/www/js/lib/nav/AddressView.js
index 9e0c49b6..6fe8416f 100755
--- a/StoneIsland/www/js/lib/nav/AddressView.js
+++ b/StoneIsland/www/js/lib/nav/AddressView.js
@@ -39,7 +39,7 @@ var AddressView = SerializableView.extend({
validate_fields: function(data, errors){
if (this.disabled) { return }
if (this.checkPhone) {
- var phone_number = data.Phone ? data.Phone.replace(/[^0-9]/g, "") : ""
+ var phone_number = data.Phone ? data.Phone.replace(/[^0-9]/g, "").replace(/^[01]+/)) : ""
var phone_length = phone_number.length
if (phone_length === 0 || ! data.Phone) {
errors.push([ "Phone", "Please enter your phone number." ])