I know about that, just like...
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
ActionErrors errors = new ActionErrors();
// check only if the second radio button is selected
if(this.selected.equals("1") && !DateUtils.isDateValid(this.day,
this.month, this.year))
{
ActionError newError = new ActionError("global.error.invalid_date");
errors.add(ActionErrors.GLOBAL_ERROR, newError);
}
return errors;
}
but I want use dynamic forms. One solution is to use javascript that
detects when the current date is selected. Then get the current system
date an put it to the validator. But this isn't nice for me.
Marco
Zimmer, Robin (SSABSA) wrote:
> Once simple option is just to use a plain old ActionForm and override the
> validate method.
>
> -----Original Message-----
> From: Marco Maier [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 16 August 2002 5:48 PM
> To: Struts Users Mailing List
> Subject: Validator problem!
>
>
> Hi,
>
> Im using the struts validator to validate a date in an DynaValidatorForm.
> In my JSP I have two radio buttons where the user can
> choose between the current date and an input field that requires
> an valid date.
> The Struts validator always validates the date from the
> input field. But I want that the validator doesn't
> validate the date when the current date is selected.
>
> How can I disable the validation when the
> current date radio button is selected?
>
> TIA
> Marco
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>