public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
if("commit".equals(request.getParameter("action"))) {
ActionErrors msgs = new ActionErrors();
for(Iterator i = selectedItems.iterator(); i.hasNext(); ) {
ClientRestrictionItem item = (ClientRestrictionItem)i.next();
String exceptions = item.getClientRestriction().getExceptions();
StringTokenizer t = new StringTokenizer(exceptions, "\r\n");
while(t.hasMoreTokens()) {
String pattern = t.nextToken();
try {
Pattern.compile(pattern);
}
catch(Exception e) {
msgs.add(Globals.MESSAGE_KEY, new ActionMessage("clientRestrictions.error.invalidExceptionPattern", e.getMessage(),
item.getClientRestriction().getOsName(), item.getClientRestriction().getPropertyName()));
}
}
}
return msgs;
}