From 314799cd83fe5a2a300643a026e37f8dfa58a52c Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 14 Mar 2010 15:43:26 +0100 Subject: [PATCH] Realname cannot be blank - see issue 4 --- src/org/yaaic/view/AddServerActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/yaaic/view/AddServerActivity.java b/src/org/yaaic/view/AddServerActivity.java index 5999741..cbb8947 100644 --- a/src/org/yaaic/view/AddServerActivity.java +++ b/src/org/yaaic/view/AddServerActivity.java @@ -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: ::= { | | } // ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}' // Chars that are not in RFC 1459 but are supported too: