1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 10:52:16 -05:00

Underscore (_) is now allowed as first char in nickname

This commit is contained in:
Sebastian Kaspari 2010-08-27 19:13:23 +02:00
parent 311889278d
commit 28854e2626

View File

@ -385,7 +385,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");
}