Use isPhoneNumber from ProxyConfig
This commit is contained in:
parent
4396c1ea6a
commit
872a230105
1 changed files with 2 additions and 1 deletions
|
@ -157,7 +157,8 @@ public class WizardFragment extends Fragment {
|
|||
|
||||
private boolean isUsernameCorrect(String username) {
|
||||
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 {
|
||||
return username.matches("^[a-zA-Z]+[a-zA-Z0-9.\\-_]{2,}$");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue