if (new Integer(6).equals(getDestinationSelection())) { // message to msisdn must not contain placeholders for (destination) user
allowedPlaceholders.removeAll(TemplateEngine.VALID_SMS_MESSAGE_PLACEHOLDERS);
}
if (!templateEngine.validateTemplate(getMessage(), allowedPlaceholders)) {
errors.add("message", new ActionMessage("smssvc.illegalPlaceholdersFound"));
} else if (templateEngine.computeMaxMessageLength(getMessage()) == Integer.MAX_VALUE) {
errors.add("message", new ActionMessage("smssvc.missingPlaceholderLengths"));
} else if (templateEngine.computeMaxMessageLength(getMessage()) > SmsInteractionEnterOrEditAction.MAX_MESSAGE_TEXT_LENGTH) {
errors.add("message", new ActionMessage("smssvc.messageLongerThan450characters"));
}
return errors;