Commits

Anonymous committed 2a5332e

Fix for client side form validation and i18n problems
Submitted by: Schava Eugene

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@759e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/validator/validators/ValidatorSupport.java

 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.util.TextParseUtil;
-import com.opensymphony.xwork.validator.ShortCircuitableValidator;
-import com.opensymphony.xwork.validator.ValidationException;
-import com.opensymphony.xwork.validator.Validator;
-import com.opensymphony.xwork.validator.ValidatorContext;
+import com.opensymphony.xwork.validator.*;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
             if ((defaultMessage == null) || (defaultMessage.trim().equals(""))) {
                 defaultMessage = messageKey;
             }
-
+            if ( validatorContext == null) {
+                validatorContext = new DelegatingValidatorContext(object);
+            }
             message = validatorContext.getText(messageKey, defaultMessage);
         } else {
             message = defaultMessage;