Thanks for the help that mask works,

but there seeems to be a conversion problem with integer values, when i try to send the +1234 to an Integer Form Field ist gets nulled (without error), 1234 or -1234 work just fine, Double Fields accept all three.

Sometimes I think my Machine wants to kick my ass. ;)

Thanks
Thomas



Robert Miller schrieb:

Thomas,
I agree with the escaping "+" (without escaping it is interpreted as
"must have one or more of the previous").
Also if you wanted you could use "\d" instead of "[0-9]".

A modified version that looks good is: ^(\+|-)?\d+$

This will match "x" or "+x"  or "-x" (where x is any series of one or
more digits, the number of digits have no upper limit).
Your original design would also have matched "+" or "-" without digits
following.
To fix this the last "*" needed to be changed to a "+".

Allowing digits only without a proceeding "+" or "-" was something I
added.
That can be removed by taking out the "?" in the regular expression I
gave.
Hope this helps.
Robert



[EMAIL PROTECTED] 7/30/2004 8:10:14 AM >>>



have you tried escaping the + and -? [\+\-]



-----Original Message-----
From: Thomas Vogt [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:10 AM
To: [EMAIL PROTECTED]
Subject: Help on Validator MASK needed


Hi, I would appreciate some help,

My DynaValidator Form doesn't get validated, I need a signed value (the
field is an Integer). But the Mask doesn't seem to get the meaning in the
plus or minus in front. Thats why whenever the form gets validated i get the
mask error.


Below is my actual validation.xml, but I tried combinations like : [+-]{1}
or [+-]{1} or [+-]{1} too


<field property="liquiditaetsaenderung" depends="required, mask">
<msg name="mask" key="error.mask.liquiditaetsaenderung.entscheidung"/>
<arg0 key="error.field.liquiditaetsaenderung.entscheidung"/>




<var><var-name>mask</var-name><var-value>^+|-[0-9]*$</var-value></var>


</field>

Anyone with an idea on how to solve this problem ??

Thanks

Thomas

________________________________________________
Message sent using UebiMiau 2.7.8






---------------------------------------------------------------------


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to