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=31514>.
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=31514
Either insufficient docs on validwhen or a bug
Summary: Either insufficient docs on validwhen or a bug
Product: Struts
Version: 1.2.4
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Major
Priority: Other
Component: Validator Framework
AssignedTo: dev@struts.apache.org
ReportedBy: yegor.jbanov@spicesoft.com
There are six fields in the form I receive. All are required and integers. I
try to use validwhen to validate one of them against the others in the
following way:
<field property="END_DATE_DAY" depends="required,integer,validwhen">
<arg0 key="End day" resource="false"/>
<msg name="validwhen" key="errors.startEndDate2" resource="true"/>
<var>
<var-name>test</var-name>
<var-value>((*this* >= START_DATE_DAY) or ((END_DATE_MONTH -
START_DATE_MONTH) > (12 * (START_DATE_YEAR - END_DATE_YEAR))))</var-value>
</var>
</field>
The idea is quite simple, 'start date' cannot be later than 'end date'. As a
result this does not work, even if (*this* >= START_DATE_DAY) is true. The
documentation on validwhen is negligible. That is why I could not figure out
whether it is a bug or unsupported feature. Anyway, more documentation should
be provided on the feature, at least in Javadocs.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
|