On 25/07/05, Vandenbroucke Gregory <[EMAIL PROTECTED]> wrote: > Hi all, > > I have several forms which contain fields that should only accept numeric > data. If the entered data wasn't numeric, then during validation of that > field I would like to be able to leave the form field empty. But struts will > auto populate all fields. Meaning that for numeric fields it will enter > zero's if the entered data wasn't numeric. > Is there any way to circumvent this, and leave the form fields empty if the > entered data wasn't correct?
Are your your form fields strings? If so the user's input will be kept even if validation fails. If they are ints you get a 0 instead, because that is that that is the default value of an int. Kjersti > > TIA, > Gregory. > > > --------------------------------------------------------------------- > 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]