Or a custom validator (that could be chained with others), sort of a
"validateIfFilled" type thing.

Dave

On Mon, Mar 14, 2011 at 8:58 AM, Paul Zepernick
<pzepern...@commercebenefitsgroup.com> wrote:
> If you need to use the XML you might be able to use the field expression
> validator.  It probably would be easier to just put it in the validate()
> though as suggested.
>
>
> http://struts.apache.org/2.0.14/docs/fieldexpression-validator.html
>
> Paul
>
>
>
> -----Original Message-----
> From: Paweł Wielgus [mailto:poulw...@gmail.com]
> Sent: Monday, March 14, 2011 6:32 AM
> To: Struts Users Mailing List
> Cc: Mohamed SIDI
> Subject: Re: Validate filed if filled
>
> Hi Mohamed,
> i would do it in actions validate method,
> not in xml.
> But that's just my oppinion.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2011/3/14 Mohamed SIDI <mhm.s...@gmail.com>:
>> Hi all,
>>
>> In my Web User Interface, I have a field witch is not a mandatory filed,
>> for
>> this filed I want to define a validation rule in my
>> ActionName-validator.xml
>> only when it was filled, somneone can help to do that
>>
>> BW
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
> The information contained in this transmission contains
> confidential information that is legally privileged. This information is
> intended only for the use of the individual or entity named above. The
> authorized recipient of this information is prohibited from disclosing this
> information to any other party unless required to do so by law or regulation
> and is required to destroy the information after its stated need has been
> fulfilled.
>
> If you are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or action taken in reliance on the
> contents of these documents is strictly prohibited. If you have received
> this information in error, please notify the sender immediately by return
> email and arrange for the return or destruction of these documents.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to