I don't have problems with any validations except validating
longs. I'm trying to validate a long value using DynaValidatorForm.

If i put something else than a long as a
requestparameter(/theAction?id=someletters),
the validator does not return an error. Instead the action is called, which
gets
the value 0(zero) from the form. Shouldn't the validator return an error?

struts-config.xml:
<form-bean name="theForm"
type="org.apache.struts.validator.DynaValidatorForm">
  <form-property name="id" type="java.lang.Long"/>
</form-bean>

<action path="/theAction" type="TheAction" name="theForm"
input="/theframe.jsp" scope="request"/>


validation.xml:
<form name="theForm">
  <field property="id" depends="required,long">
   <arg0 key="theform.id.displayname"/>
  </field>
</form>


cheers,
Sakke Wiik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to