DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34454>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34454 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15272|validator-rules file with |validator-rules file with description|the complete javascript that|javascript needed for this |is need for this patch to |patch to run |run | ------- Additional Comments From [EMAIL PROTECTED] 2005-06-13 19:58 ------- (From update of attachment 15272) ><?xml version="1.0" encoding="ISO-8859-1"?> ><!DOCTYPE form-validation PUBLIC > "-//Apache Software Foundation//DTD Commons Validator Rules Configuration > 1.1.3//EN" > "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd"> > ><form-validation> > <global> > <validator name="consecutiveDates" > classname="cr.go.ice.pel.web.validotor.ValidationUtils" > method="validateConsecutiveDates" > methodParams="java.lang.Object, > org.apache.commons.validator.ValidatorAction, > org.apache.commons.validator.Field, > org.apache.struts.action.ActionMessages, > javax.servlet.http.HttpServletRequest" > depends="" > msg="errors.fechas"> > <javascript> > <![CDATA[ > function validateConsecutiveDates(form) { > var bValid = true; > var focusField = null; > var i = 0; > var fields = new Array(); > var formName = form.getAttributeNode("name"); > oTwoFields = eval('new ' + formName.value + > '_consecutiveDates()'); > > for (x in oTwoFields) { > var field = form[oTwoFields[x][0]]; > var secondField = form[oTwoFields[x][2]("secondProperty")]; > > if (field.type == 'text' || > field.type == 'textarea' || > field.type == 'select-one' || > field.type == 'radio' || > field.type == 'password') { > > var value; > var secondValue; > > // get field's value > if (field.type == "select-one") { > var si = field.selectedIndex; > value = field.options[si].value; > secondValue = secondField.options[si].value; > } else { > value = field.value; > secondValue = secondField.value; > } > > if (Date.parse(value) > Date.parse(secondValue)) { > if (i == 0) { > focusField = field; > } > fields[i++] = oTwoFields[x][1]; > bValid = false; > } > } > } > > if (fields.length > 0) { > focusField.focus(); > alert(fields.join('\n')); > } > return bValid; > }]]> > </javascript> > </validator> > </global> ></form-validation> -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]