mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-26 10:52:16 -05:00
AddServerActivity: Fixed username regex - allow "-" in nicknames
This commit is contained in:
parent
f67594d85d
commit
826f06fb01
@ -332,7 +332,7 @@ public class AddServerActivity extends Activity implements OnClickListener
|
||||
// <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}'
|
||||
// Chars that are not in RFC 1459 but are supported too:
|
||||
// | and _
|
||||
Pattern nickPattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9^-`\\[\\]{}|_\\\\]*$");
|
||||
Pattern nickPattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9^\\-`\\[\\]{}|_\\\\]*$");
|
||||
if (!nickPattern.matcher(nickname).matches()) {
|
||||
throw new ValidationException("Invalid nickname");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user