-// if (!username.getText().matches(UserAdminService.USERNAME_PATTERN))
-// return "Wrong user name format, should be lower case, between 3 and 64 characters with only '_' an '@' as acceptable special character.";
+ // if (!username.getText().matches(UserAdminService.USERNAME_PATTERN))
+ // return
+ // "Wrong user name format, should be lower case, between 3 and 64 characters with only '_' an '@' as acceptable special character.";
+
+ if (username.getText().trim().equals(""))
+ return "User name must not be empty";
+