WW-3736: Client Validation is broken for Struts2 themes

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1240312 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Johannes Geppert
2012-02-03 19:44:51 +00:00
parent b5eebb9842
commit 261c5fb996
@@ -24,11 +24,16 @@ var StrutsUtils = {};
// gets an object with validation errors from string returned by
// the ajaxValidation interceptor
StrutsUtils.getValidationErrors = function(data) {
if(data.indexOf("/* {") === 0) {
return eval("( " + data.substring(2, data.length - 2) + " )");
} else {
return null;
}
if (typeof data === "object") {
return data;
}
else {
if (data.indexOf("/* {") === 0) {
return eval("( " + data.substring(2, data.length - 2) + " )");
} else {
return null;
}
}
};
StrutsUtils.clearValidationErrors = function(form) {