The @Wizard annotation might work for you. With wizard beans, validation
only applies to fields that were actually rendered in the form that is
submitted. This normally serves to allow for the inputs to be presented
across several pages, but it might also work for your case.

If that doesn't work, then you can implement ValidationErrorHandler and
remove the validation error for the field in question when it is not
required.

-Ben

On Mon, Mar 30, 2009 at 9:53 AM, <[email protected]> wrote:

>
> Hi,
>
> I'm looking for the best way to validate a form field that may or may not
> be shown in the form.
>
> This means that if the field is shown a number is required, if it is not
> nothing is required. How do I express that - "must be null or a valid
> number"?
>
> Thanks,
>
> -dennis
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to