struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Néstor Boscán" <nesto...@gmail.com>
Subject Re: Advanced Struts 2 Validation Question...
Date Thu, 13 Nov 2008 15:41:48 GMT
if you want javascript validation you will have to create your own theme and
own validation. You will have to create your own validator class and modify
the form-close-validation.ftl. This is what I've done in the past. Once you
figure out the details you start creating and reusing validators.

On Thu, Nov 13, 2008 at 11:06 AM, Burton Rhodes <burtonrhodes@gmail.com>wrote:

> How do I use validation in an [Action]-validation.xml file to validate
> several fields?
>
> I need to implement the following logic for 3 fields on a form:
> Company, FirstName, LastName.
>
> Psedo Code:
>
> If Company empty, then FirstName and LastName must be filled
> If FirstName and LastName empty, then Company Must be filled.
>
> I am having trouble seeing how this can be accomplished with the
> "expression" validator type.
>
> Or should I just write some simple javascript to make this happen?!
>
> Thanks!!
> Burton
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message