Dear Ricky, Why won't you validate the maximum value? If you don't, then you risk a database exception, if the value entered is too high. Is that the result you want?
Robert -----Original Message----- From: Ricky [mailto:[EMAIL PROTECTED] Sent: Friday, November 28, 2003 5:54 PM To: Struts Users Mailing List Subject: Re: Range validation by validation.xml hi, if the value must be greater than 0. do you have any other better way? now i am using range , if i don't set the max value, it can't work ,otherwise , set a limited value, i don't know the value that inputed. i can use "validwhen", but it's not available in Struts 1.1 now.... :( ----- Original Message ----- From: "Robert Lamping" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, November 26, 2003 10:11 PM Subject: RE: Range validation by validation.xml Dear Honza, I would suggest you also supply the maximum value. <var> <var-name>max</var-name> <var-value>999999</var-value> </var> The presentation in which you are working already knows something from the data layer, i.e. the value must be greater than 0. In order to prevent errors due to storing a value higher than the allowed value, I would suggest you also enter the maximum value. When you change the maximum allowed value in the table then indeed you have to change the validation.xml. When you rewrite your tests this need for adaptation will pop up. Kind regards, Robert -----Original Message----- From: Honza Spurný [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 9:25 AM To: [EMAIL PROTECTED] Subject: Range validation by validation.xml Hi there, I know, that is possible to validate throught validation.xml file if input is integer in the specified range... But I would like to check, if the input number is unsigned int. (It means in the range where minimum is equal to 1 and maximum is not specified -- 1,2,3,4,... ) I would like to range the input only from the minimum value, but not from the maximum value. Is any esay way how to do it? I've tried to specified this in validation.xml, but it doesn't work as I want: <field property="numberForm" depends="integer, intRange"> <var> <var-name>min</var-name> <var-value>1</var-value> </var> <arg0 key="tech.gtsID.label"/> <arg1 .../> </field> Thanks for helping. Sporak --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

