Why not just setup a few constants and use them later as your ${var:max}
where appropriate? I got the maxInteger value from echo printing
Integer.MAX_VALUE. Once you define a constant for maxInteger or maxFloat,
just reference it as your var {$maxFloat} or var {$maxInteger}.
<form-validation>
<global>
<constant>
<constant-name>maxInteger</constant-name>
<constant-value>2147483647</constant-value>
</constant>
</global>
<formset>
<!-- for a bean named "valid" -->
<form name="valid">
<field property="username" depends="required,integer,intRange">
<arg0 key="buy.program.fieldname" />
<arg1
name="range"
key="${var:min}"
resource="false"/>
<arg2
name="range"
key="${var:max}"
resource="false"/>
<var>
<var-name>min</var-name>
<var-value>10</var-value>
</var>
<var>
<var-name>max</var-name>
<!-- SEE the constant used below for the
intRange? --->
<var-value>${maxInteger}</var-value>
</var>
</field>
</form>
</form-validation>
-----Original Message-----
From: Budi Rostiarso [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 10:19 PM
To: [EMAIL PROTECTED]
Subject: validator, range
Hi all,
quick question on validation:
Can we setup validator with rules like "x must be equal or greater than
8", just to limit the lower bound ?
Currently, i use the range validator, which means i have to specify the
lower and upper bound, right?
Any clues and pointers appreciated.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]