try this:

<field key="registerAreaKey" name="AreaCode" type="int" mapToProperty="AreaCode">
<rule value="5" name="minLength">PLZ muss fuenfstellig sein!</rule>
<rule value="^[0-9]{0,5}$" name="mask">Bitte nur numerische Werte fuer PLZ eingeben!</rule>
</field>


i'm not sure if there is a rule like invalidNumber or notANumberMessage!
imho i think there are four rules:
- minlength
- maxlength
- required
- mask (with regexp)

the above mask rule checks if there are exactly 5 or none digits!

greetz,
sven kuncikowski

David Demner wrote:
Hi,

I think the rule name is actually 'invalidNumber'.  Maybe try this?

David

-----Original Message-----
From: Andreas Schwersenz [mailto:[EMAIL PROTECTED] Sent: Monday October 4, 2004 12:13 PM
To: [EMAIL PROTECTED]
Subject: problem with intake / notANumberMessage



Hi,

I'm trying to validate an input-field whether it has an int-compatible value
or not. So I created the following rules:

<group name="testgroup" key="testgroupkey" mapToObject="test">
        ...
<field name="test1" key="test1key" type="int" mapToProperty="LengthMin">
        <rule name="notANumberMessage">Bitte geben Sie eine Zahl ein.</rule>
        <rule name="maxValue" value="10">Bitte geben Sie eine kleinere Zahl
ein.</rule>
        ...             
</group>

The validation works well, but in case I fill in a not numeric value, intake
rejects the form but it won't print out the corresponding error message. It
just prints one empty character. This problem exists only with the
notANumberMessage-rule not with the max-Value-rule. In case the input-value
is too large, intake prints out the maxValue-error message. Any ideas?


Thx Andreas




--------------------------------------------------------------------- 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