Hi Sven,

According to Intake the source code, the following rules are valid:

    /** "flexible" Rule, used in DateFormat Validator */
    String FLEXIBLE_RULE_NAME = "flexible";

    /** "format" Rule, used in DateFormat Validator */
    String FORMAT_RULE_NAME = "format";

    /** "invalidNumber" Rule, used in the various Number Validators */
    String INVALID_NUMBER_RULE_NAME = "invalidNumber";

    /** "mask" Rule, used in StringValidator */
    String MASK_RULE_NAME = "mask";

    /** "maxLength" Rule, used in all validators */
    String MAX_LENGTH_RULE_NAME = "maxLength";

    /** "maxValue" Rule, used in the various Number Validators */
    String MAX_VALUE_RULE_NAME = "maxValue";

    /** "minLength" Rule, used in all validators */
    String MIN_LENGTH_RULE_NAME = "minLength";

    /** "minValue" Rule, used in the various Number Validators */
    String MIN_VALUE_RULE_NAME = "minValue";

    /** "required" Rule, used in all validators */
    String REQUIRED_RULE_NAME = "required";

Not sure what all of them do, but there's the list anyway.

David

PS: It looks like the minLength rule isn't necessary since it will be
captured in the mask anyway.

-----Original Message-----
From: Sven Kuncikowski [mailto:[EMAIL PROTECTED] 
Sent: Monday October 4, 2004 11:43 PM
To: Turbine Users List
Subject: Re: problem with intake / notANumberMessage


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