mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user