在validation.xml中配置了requiredif,在客户端出错
requiredif是条件check,为什么在IE端生成的javaScript代码不是条件check呢?
validator-rules.xml :
<validator name= "requiredif "
classname= "org.apache.struts.validator.FieldChecks "
method= "validateRequiredIf "
methodParams= "java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.
ActionMessages,
org.apache.commons.validator.Validator,
javax.servlet.http.HttpServletRequest "
msg= "EM0010 "
jsFunctionName= "validateRequiredIf ">
<javascript> <![CDATA[ function validateRequiredIf(form) {
var isValid = true;
var focusField = null;
var i = 0;
var fields = new Array();
var formName = form.getAttributeNode( "name ");
oRequired = eval( 'new ' + formName.value+ '_validateRequiredIf() ');