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
1 changed files with 5 additions and 1 deletions

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: