Prevent incompatible contact number to be added

In the last commits I added the country code in the early stages of the
phone numbe validation.

I think it was a mistake as it make ad non prefixed phone number to be
added in the tsv file.

I revert this part here.
master
Stacy Harper 4 years ago
parent af35294af6
commit 574509115c
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 4
      scripts/core/sxmo_contactmenu.sh

@ -4,13 +4,13 @@
. "$(dirname "$0")/sxmo_common.sh" . "$(dirname "$0")/sxmo_common.sh"
valid_number() { valid_number() {
if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1"; then if pn valid "$1"; then
echo "$1" echo "$1"
return return
fi fi
REFORMATTED="$(pn find ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1")" REFORMATTED="$(pn find ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1")"
if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$REFORMATTED"; then if pn valid "$REFORMATTED"; then
echo "$REFORMATTED" echo "$REFORMATTED"
return return
fi fi

Loading…
Cancel
Save