FormInputValues inputs) throws Exception {
I18nSupport i18n = I18nSupport.getInstance(request);
Locale locale = i18n.getLocale(request);
FormsSupport support = FormsSupport.getInstance(request);
Form form = support.getForm(request, locale, mapping.getPath());
if (form == null) {
throw new ConfigException("No form for action '" + mapping.getPath() + "'");
}
ActionErrors errors = null;
// execute validation
FormResult result = form.validate(request, inputs);
if (!result.isValid()) { // collect error messages
errors = new ActionErrors();
Messages messages = result.getMessages();
Iterator names = messages.getKeys();
while (names.hasNext()) {