diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-01-05 00:23:49 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-01-05 00:26:34 +0000 |
commit | 4c111845e8e67ad2313185db116f203391f11de3 (patch) | |
tree | f975a1e15f5234146d7def649eccd4deb63ea215 /apps/settings/src | |
parent | 74a0ac8854536c34bf7621033c79ebd0db79f3b4 (diff) | |
download | nextcloud-server-4c111845e8e67ad2313185db116f203391f11de3.tar.gz nextcloud-server-4c111845e8e67ad2313185db116f203391f11de3.zip |
Fix default phone region validation
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/src')
-rw-r--r-- | apps/settings/src/components/PersonalInfo/PhoneSection.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/settings/src/components/PersonalInfo/PhoneSection.vue b/apps/settings/src/components/PersonalInfo/PhoneSection.vue index 45641cd8e14..ddb5cf33cff 100644 --- a/apps/settings/src/components/PersonalInfo/PhoneSection.vue +++ b/apps/settings/src/components/PersonalInfo/PhoneSection.vue @@ -35,7 +35,10 @@ import AccountPropertySection from './shared/AccountPropertySection.vue' import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.js' -const { phone } = loadState('settings', 'personalInfoParameters', {}) +const { + defaultPhoneRegion, + phone, +} = loadState('settings', 'personalInfoParameters', {}) export default { name: 'PhoneSection', @@ -52,6 +55,9 @@ export default { methods: { onValidate(value) { + if (defaultPhoneRegion) { + return isValidPhoneNumber(value, defaultPhoneRegion) + } return isValidPhoneNumber(value) }, }, |