RE: validator, range
I've used constants before, for date format pattern and maxlength. And looks like i'm using the appropriate validator afterall. So, maxInt is 2147483647. Can you give me the exact maxFloat value...? hehe...just kidding. Thanks Dave. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 1:17 PM To: Struts Users Mailing List Subject: RE: validator, range 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}. maxInteger 2147483647 min 10 max ${maxInteger} -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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validator, range
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}. maxInteger 2147483647 min 10 max ${maxInteger} -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]
RE: Validator range server-side check assumes Integer?
Then use doubleRange:). -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Brian Chaplin Sent: July 24, 2003 4:56 PM To: [EMAIL PROTECTED] Subject: Re: Validator range server-side check assumes Integer? I want to check that it's within range and also a double. With or without the double it still tries to validate it as an integer. I suspect intRange will continue to do that. "Yansheng Lin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Try to use 'intRange' instead of 'range'. 'range' is deprecated. > > Also if it's a int, why there is a 'double' in depends? > > > > > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Brian Chaplin > Sent: July 24, 2003 2:02 PM > To: [EMAIL PROTECTED] > Subject: Validator range server-side check assumes Integer? > > > I'm validating a BigDecimal (money) form field and when I put a range > validation on, it assumes that the data type must be integer. > The javascript is okay but the server-side validation checks for integer: > > > > > > > > > > > > min > > 5 > > > > > > max > > 100 > > > > > > yields an error message of > > fee amount must be an integer > > > > > > > > - > 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]
Re: Validator range server-side check assumes Integer?
I want to check that it's within range and also a double. With or without the double it still tries to validate it as an integer. I suspect intRange will continue to do that. "Yansheng Lin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Try to use 'intRange' instead of 'range'. 'range' is deprecated. > > Also if it's a int, why there is a 'double' in depends? > > > > > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Brian Chaplin > Sent: July 24, 2003 2:02 PM > To: [EMAIL PROTECTED] > Subject: Validator range server-side check assumes Integer? > > > I'm validating a BigDecimal (money) form field and when I put a range > validation on, it assumes that the data type must be integer. > The javascript is okay but the server-side validation checks for integer: > > > > > > > > > > > > min > > 5 > > > > > > max > > 100 > > > > > > yields an error message of > > fee amount must be an integer > > > > > > > > - > 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]
RE: Validator range server-side check assumes Integer?
Try to use 'intRange' instead of 'range'. 'range' is deprecated. Also if it's a int, why there is a 'double' in depends? -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Brian Chaplin Sent: July 24, 2003 2:02 PM To: [EMAIL PROTECTED] Subject: Validator range server-side check assumes Integer? I'm validating a BigDecimal (money) form field and when I put a range validation on, it assumes that the data type must be integer. The javascript is okay but the server-side validation checks for integer: min 5 max 100 yields an error message of fee amount must be an integer - 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]