Skip to content

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Jan 5, 2023

Fix #35952

Summary

The default_phone_region config value

/**
* This sets the default region for phone numbers on your Nextcloud server,
* using ISO 3166-1 country codes such as ``DE`` for Germany, ``FR`` for France, …
* It is required to allow inserting phone numbers in the user profiles starting
* without the country code (e.g. +49 for Germany).
*
* No default value!
*/
'default_phone_region' => 'GB',
was not being used when validating the phone number on the frontend

libphonenumber-js supports the ISO 3166-1 country codes as detailed in the docs https://github.com/catamphetamine/libphonenumber-js#country-code

Checklist

Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal added this to the Nextcloud 26 milestone Jan 5, 2023
@Pytal Pytal self-assigned this Jan 5, 2023
@Pytal
Copy link
Member Author

Pytal commented Jan 5, 2023

/backport to stable25

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but didnt test

@szaimen szaimen merged commit b3b941b into master Jan 5, 2023
@szaimen szaimen deleted the fix/default-phone-region branch January 5, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: default_phone_region not used when frontend evaluates user phone number

4 participants