Commit 7eb06aad authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Improved error checking to ensure that the entered JID is a bare JID.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@162 b35dd754-fafc-0310-a699-88a17e54d16e
parent cd422108
......@@ -39,7 +39,7 @@
Map errors = new HashMap();
if (add) {
// do validation
if (userJID == null) {
if (userJID == null || userJID.indexOf('@') == -1) {
errors.put("userJID","userJID");
}
if (errors.size() == 0) {
......@@ -198,7 +198,7 @@ Total Users: <%= userCount %>.
<% if (errors.get("userJID") != null) { %>
<span class="jive-error-text">
Please enter a valid bare JID.
Please enter a valid bare JID (e.g. johndoe@company.org).
</span>
<% } %>
......
......@@ -37,7 +37,7 @@
Map errors = new HashMap();
if (add) {
// do validation
if (userJID == null) {
if (userJID == null || userJID.indexOf('@') == -1) {
errors.put("userJID","userJID");
}
if (errors.size() == 0) {
......@@ -190,7 +190,7 @@ Total Users: <%= userCount %>.
<% if (errors.get("userJID") != null) { %>
<span class="jive-error-text">
Please enter a valid bare JID.
Please enter a valid bare JID (e.g. johndoe@company.org).
</span>
<% } %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment