mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-22 14:08:30 +00:00
Use isPhoneNumber from ProxyConfig
This commit is contained in:
parent
83556f1ed6
commit
210cf67f8f
1 changed files with 2 additions and 1 deletions
|
|
@ -157,7 +157,8 @@ public class WizardFragment extends Fragment {
|
||||||
|
|
||||||
private boolean isUsernameCorrect(String username) {
|
private boolean isUsernameCorrect(String username) {
|
||||||
if (getResources().getBoolean(R.bool.allow_only_phone_numbers_in_wizard)) {
|
if (getResources().getBoolean(R.bool.allow_only_phone_numbers_in_wizard)) {
|
||||||
return username.matches("^(\\+)?(\\d-)?(\\d{3}-)?(\\d{3}-)?\\d{4,}$");
|
LinphoneProxyConfig lpc = LinphoneManager.getLc().createProxyConfig();
|
||||||
|
return lpc.isPhoneNumber(username);
|
||||||
} else {
|
} else {
|
||||||
return username.matches("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$");
|
return username.matches("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue