mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-29 20:32:22 -05:00
Underscore (_) is now allowed as first char in nickname
This commit is contained in:
parent
311889278d
commit
28854e2626
@ -385,7 +385,7 @@ public class AddServerActivity extends Activity implements OnClickListener
|
|||||||
// <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}'
|
// <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}'
|
||||||
// Chars that are not in RFC 1459 but are supported too:
|
// Chars that are not in RFC 1459 but are supported too:
|
||||||
// | and _
|
// | 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()) {
|
if (!nickPattern.matcher(nickname).matches()) {
|
||||||
throw new ValidationException("Invalid nickname");
|
throw new ValidationException("Invalid nickname");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user