When I switch it to a java.lang.String will it works!
So the real question is how to validate a float to be required?
Nathan On Feb 2, 2004, at 1:32 PM, Larry Meadors wrote:
It is because beanutils converts anything that is invalid to a 0, and therefore, it is present, meeting the requirement for the required dependancy.
Stupid, huh?
Larry
[EMAIL PROTECTED] 02/02/04 1:25 PM >>>All of my other forms validate perfect. This form will only validate the name field and not the two breakpoint fields.
I have tried everything.... Any ideas?
<action path="/admin/UpdateMetric" type="dashboard.presentation.actions.admin.UpdateMetricAction" name="MetricForm" validate="true" input="/pages/admin/EditMetric.jsp" scope="request" attribute="metricForm"> <forward name="success" redirect="false" path="/pages/admin/EditMetric.jsp" /> <forward name="failure" redirect="false" path="/pages/admin/EditMetric.jsp" /> </action>
<form-bean name="MetricForm" type="org.apache.struts.validator.DynaValidatorActionForm"> <form-property name="id" type="java.lang.Integer" /> <form-property name="name" type="java.lang.String" /> <form-property name="archiveFlag" type="java.lang.Boolean" /> <form-property name="rollable" type="java.lang.Boolean" /> <form-property name="frequency" type="java.lang.Integer" /> <form-property name="exculde" type="java.lang.Boolean" /> <form-property name="entryLevel" type="java.lang.Integer" /> <form-property name="complianceDirection" type="java.lang.Integer" /> <form-property name="description" type="java.lang.String" /> <form-property name="type" type="java.lang.Integer" /> <form-property name="greenBreakpoint" type="java.lang.Float" /> <form-property name="redBreakpoint" type="java.lang.Float" /> </form-bean>
<form name="/admin/UpdateMetric"> <field property="name" depends="required,maxlength"> <var><var-name>maxlength</var-name><var-value>150</var-value></var> <arg0 key="app.metric.name" /> <arg1 name="maxlength" key="${var:maxlength}" resource="false" /> </field> <field property="description" depends="maxlength"> <var><var-name>maxlength</var-name><var-value>1300</var-value></var> <arg0 key="app.metric.description" /> <arg1 name="maxlength" key="${var:maxlength}" resource="false" /> </field> <field property="greenBreakpoint" depends="required"> <arg0 key="app.metric.greenBreakpoint" /> </field> <field property="redBreakpoint" depends="required"><arg0 key="app.metric.redBreakpoint" /> </field> </form>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]