fixed bug with phone number not validating correctly
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user