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.
This commit is contained in:
Stacy Harper 2021-06-18 17:42:20 +02:00
parent af35294af6
commit 574509115c
No known key found for this signature in database
GPG key ID: 5BAC92328B7C5D65

View file

@ -4,13 +4,13 @@
. "$(dirname "$0")/sxmo_common.sh"
valid_number() {
if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1"; then
if pn valid "$1"; then
echo "$1"
return
fi
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"
return
fi