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:
parent
af35294af6
commit
574509115c
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue