On 4/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> I am trying to use the TwoField pluggable Validator example from the
> struts's site. I replaced the deprecated method calls in
> validateTwoFields(..). For some reason, when I run my application, it
> doesn't validate the input fields. Instead it directly takes me to the
> success page after I hit submit. I tried debugging the
> validateTwoFields(..) and found that it's returning "false" when the input
> fields did not match. But still the control is forwarding to the success
> page. Here's my action mapping.

Returning "false" from a validator doesn't stop struts from continuing
- its adding a message(s) to the ActionErrors returned by the
ActionForm's validate method. If you look at the Struts FieldChecks
class you will see that all the configured methods do that. So is your
validateTwoFields(...) method doing it?

Niall

>            <action     path="/pwdAction"
>                  name="pwdForm"
>                  type="actions.PWDAction"
>                  scope="request"
>                  validate="true"
>                  input="/password.jsp"
>                  forward="/success.jsp">
>                  <forward name="success" path="/success.jsp"/>
>
>
> What am I doing wrong?
>
> Thanks,
> Kiran

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

Reply via email to