1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 18:32:15 -05:00

Realname cannot be blank - see issue 4

This commit is contained in:
Sebastian Kaspari 2010-03-14 15:43:26 +01:00
parent 7103510d1e
commit 314799cd83

View File

@ -167,7 +167,7 @@ public class AddServerActivity extends Activity implements OnClickListener
{
String nickname = ((EditText) findViewById(R.id.nickname)).getText().toString();
String ident = ((EditText) findViewById(R.id.ident)).getText().toString();
//String realname = ((EditText) findViewById(R.id.realname)).getText().toString();
String realname = ((EditText) findViewById(R.id.realname)).getText().toString();
if (nickname.trim().equals("")) {
throw new ValidationException("Nickname cannot be blank");
@ -177,6 +177,10 @@ public class AddServerActivity extends Activity implements OnClickListener
throw new ValidationException("Ident cannot be blank");
}
if (realname.trim().equals("")) {
throw new ValidationException("Realname cannot be blank");
}
// RFC 1459: <nick> ::= <letter> { <letter> | <number> | <special> }
// <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}'
// Chars that are not in RFC 1459 but are supported too: