From fb12ea613a508790def6ee4c2b192b41408c4ff2 Mon Sep 17 00:00:00 2001 From: Senad Uka Date: Sun, 14 Jun 2015 03:41:21 +0200 Subject: [PATCH] fixed bug with phone number not validating correctly --- front-ui/app/stores/cartStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front-ui/app/stores/cartStore.js b/front-ui/app/stores/cartStore.js index 4263c2e..b398fe9 100644 --- a/front-ui/app/stores/cartStore.js +++ b/front-ui/app/stores/cartStore.js @@ -198,7 +198,7 @@ var validateDeliveryDestinationForm = function() { _deliveryDestinationErrors['email'] = "Email mora biti ispravno upisan"; } - var phoneRegex = /[\d\s-]{8,12}/i; + var phoneRegex = /^[\d\s-]{8,12}$/i; if (Validation.safeString(_deliveryDestination.get('phone')).search(phoneRegex) < 0) { _deliveryDestinationErrors['phone'] = "Telefon mora biti ispravan"; }