You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Anders R. Sveen" <an...@f12.no> on 2004/08/05 13:05:33 UTC
Validation ignored
I've got a formbean and a action that is working, but I can't apply validation.
(config below) Through my debugger I can see that the validate() method is
called, which in turn calls super.validate(). The getCountryid() method on the
form is NEVER acessed upon submit.
--- struts-config.xml ---
<form-bean name="form_card_new_driver_applicantinfo"
type="view.card.forms.Application"/>
<action path="/new/drivercard/create"
type="view.card.actions.CreateDriverCard"
scope="request"
validate="true"
parameter="command"
name="form_card_new_driver_applicantinfo"
input="/new/drivercard/create.do">
<forward
name="display"
path="tiles_card_new_driver_applicantinfo"/>
</action>
--- validation.xml ---
<form name="form_card_new_driver_applicantinfo">
<field property="countryid" depends="required">
<arg0 key="card.apply.driver.validate.countryid.required"/>
</field>
</form>
Is there something really obvious I'm missing here or is there something else
wrong?
Thanks,
Anders,
--
Anders R. Sveen
anders@f12.no
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation ignored
Posted by "Anders R. Sveen" <an...@f12.no>.
Sorry guys. I figured it out. It helps extending ValidatorForm. Doh. ;)
Anders,
Quoting "Anders R. Sveen" <an...@f12.no>:
> I've got a formbean and a action that is working, but I can't apply
> validation.
> (config below) Through my debugger I can see that the validate() method is
> called, which in turn calls super.validate(). The getCountryid() method on
> the
> form is NEVER acessed upon submit.
>
> --- struts-config.xml ---
>
> <form-bean name="form_card_new_driver_applicantinfo"
> type="view.card.forms.Application"/>
>
> <action path="/new/drivercard/create"
> type="view.card.actions.CreateDriverCard"
> scope="request"
> validate="true"
> parameter="command"
> name="form_card_new_driver_applicantinfo"
> input="/new/drivercard/create.do">
> <forward
> name="display"
> path="tiles_card_new_driver_applicantinfo"/>
> </action>
>
> --- validation.xml ---
> <form name="form_card_new_driver_applicantinfo">
> <field property="countryid" depends="required">
> <arg0 key="card.apply.driver.validate.countryid.required"/>
> </field>
> </form>
>
> Is there something really obvious I'm missing here or is there something
> else
> wrong?
>
> Thanks,
> Anders,
>
>
> --
> Anders R. Sveen
> anders@f12.no
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Anders R. Sveen
anders@f12.no
+47 92 44 38 20
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org