You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andriy Ruzhevych <an...@beskyd.kl.if.ua> on 2004/01/26 14:57:06 UTC

Validator question

Hi.

I have a "sum" field that can have different values (money or percent),
depending on the other field "isPercent".
I want to validate money and percent type through the mask validator. I am
not sure , whether I can set two mask validators with different masks on the
same field. Maybe, somebody has solutions for such a problem?

andriy


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


RE: Validator question

Posted by Markus <ma...@gmx.com>.
> Thanks Markus
> Did you write your custom validator?
> I always use DynaValidatorForm and don't want to write custom java beans
> for
> this.
Hi,
No, for this solution you can't use DynaForms. 
 You have to write an ActionForm.

Kind regards,

Markus


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


RE: Validator question

Posted by Andriy Ruzhevych <an...@beskyd.kl.if.ua>.
Thanks Markus
Did you write your custom validator?
I always use DynaValidatorForm and don't want to write custom java beans for
this.

-----Original Message-----
From: Markus [mailto:majoko@gmx.com]
Sent: Monday, January 26, 2004 4:04 PM
To: Struts Users Mailing List
Subject: Re: Validator question


> Hi.
>
> I have a "sum" field that can have different values (money or percent),
> depending on the other field "isPercent".
> I want to validate money and percent type through the mask validator. I am
> not sure , whether I can set two mask validators with different masks on
> the
> same field. Maybe, somebody has solutions for such a problem?
>
> andriy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
HI,
I've tried to solve something like this, but it fails. In this case I've
written a validate method for this special case and I've called
super.validate(). It is much more easier and faster than try to solve it
with validwhen or
requierdif (if it is possible!).

Kind regards,

Markus


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


__________ NOD32 1.600 (20040116) Information __________

This message was checked by NOD32 antivirus system.
http://www.nod32.com



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


Re: Validator question

Posted by Markus <ma...@gmx.com>.
> Hi.
> 
> I have a "sum" field that can have different values (money or percent),
> depending on the other field "isPercent".
> I want to validate money and percent type through the mask validator. I am
> not sure , whether I can set two mask validators with different masks on
> the
> same field. Maybe, somebody has solutions for such a problem?
> 
> andriy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
HI,
I've tried to solve something like this, but it fails. In this case I've
written a validate method for this special case and I've called
super.validate(). It is much more easier and faster than try to solve it with validwhen or
requierdif (if it is possible!).

Kind regards,

Markus 


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