Fresh Installation - "Unable to set invalid phone number✖"

Hello! :smiley:

I just installed today Nextcloud on our server and on the user profile it is impossible to save phone numbers. Nextcloud send the error message:
Unable to set invalid phone number✖
image

It doesn’t seem to matter how you configure the format of the phone number. The software just rejects it.

This issue has also been reported here by another user:

I hope someone here could help me in the right direction on how to solve this issue.

Thank you very much in advance.

Kind regards

Hmm… :thinking:

Anyone here that maybe could help me out with this please?

Kind regards
AngryWarrior

Well, there is a related bug report, unless there is more information or a fix, there is not much we can do here. Ref:

Hi @AngryWarrior

did you configure the default_phone_region setting in your config.php as suggested by the Admin overview page suggestions?

/S

1 Like

This setting came out of nowhere for me after upgrading to 21.0.1
Been so long since I looked at the Admin overview pages I’m going to have to find them again.

Hi.
No we haven’t done that, (yet). But will that not also limit the phone field to accept one county?
We have employees from several different countries so it must accept different formats.

I’ve been digging a bit in the code and it looks like

  • the field only accepts phone numbers with country code (starting with + that is) if no default_phone_region is configured
  • the field only accepts phone numbers from the configured region if the default_phone_region is configured.

That’s quite a bummer and I would consider this a bug that should be reported on Github.

/S

1 Like

PS: the relevant code is this here:

1 Like

I agree.
This is indeed a bummer and quite counter productive thing. (Since the normal mode doesn’t work).

Thanks for looking into this @simonspa . :smiley: :facepunch:

I guess there is not so much that can be done here.
The Nextcloud dev team needs to fix this bug (?) and until then we can only wait for it to happen, right?

As @nickvergessen pointed out, it actually accepts any international (valid!) number in addition to the local number of the configured region - this seems to work for me, could you confirm?

1 Like

@simonspa thanks again. :heart:
I’ve added the setting and will test it shortly.

Kind regards

Confirmed.
That work-around actually does the trick. I’ve tested and it works too. :white_check_mark:

Still the faulty default mode is something I think should be considered as a bug though and hopefully be fixed in a never version. Right?

Just my 5 cents.

The phone string syntax is important and this may be what is causing consternation after updating the config with your phone zone.

Example for US:
WORKS: +13721231234

DOES NOT WORK: 3721231234

phone region has to be in capital letter
‘default_phone_region’ => ‘FR’,

how come this kind of settings can’t be set through the User Interface ?