while (names.hasMoreElements()) {
String name = names.nextElement() + "";
if (name.startsWith("META_")) {
String tname = name.substring(5);
String value = request.getParameter(name);
PropertyBean prop = type.getProperty(tname);
if ("".equals(value.trim())) {
if ("true".equalsIgnoreCase(prop.getRequired())) {
ActionError error =
new ActionError("error.editSection.propertyMissing");
errors.add("META_" + tname, error);
}
} else {
if (prop.getRegexp() != null) {
RE re = new RE(prop.getRegexp());
if (!re.match(value)) {
ActionError error =
new ActionError("error.editSection.propertyMalformed", prop.getErrorMessage());
errors.add("META_" + tname, error);
}
}
}
}