struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eirik Kjølsrud" <>
Subject Validation : Can't validate integer fields...
Date Tue, 03 Jun 2003 15:00:23 GMT

I'm new to this group. I'm a java developer working currently on projects
for the Norwegian National Lottery.

In an input form, I'm trying to validate user input on the client, making
sure that the values are integers. My problem is that no message is
presented for "errors.integer", only for "errors.required". I have tried to
list out some information in the javascript for integer validation in
'validation-rules.xml', and the field is validated correctly. I also cannot
submit the form unless all values are integers, but there is no messagebox
telling the user what is wrong as it is when the field is empty.

Any help would be appreciated : )

Best Regards
Eirik Kjølsrud, Norway

Here are some details :

I am using a DynaValidatorForm :
<form-bean name="globalgameparamDynaValForm"

<form-property name="psp" type="java.lang.Integer"/>

<form-property name="fsp" type="java.lang.Integer"/>

<form-property name="postal0" type="java.lang.Integer"/>

<form-property name="postal1" type="java.lang.Integer"/>

<form-property name="postal2" type="java.lang.Integer"/>

<form-property name="postal3" type="java.lang.Integer"/>

<form-property name="module" type="java.lang.String"/>


The part for the formset in the validation.xml file :


<form name="globalgameparamDynaValForm">

<field property="psp"


<arg0 key="globalgameparamForm.psp.displayname"/>


<field property="fsp"


<arg0 key="globalgameparamForm.fsp.displayname"/>


<field property="postal0"


<arg0 key="globalgameparamForm.postal0.displayname"/>


<field property="postal1"


<arg0 key="globalgameparamForm.fpostal1.displayname"/>


<field property="postal2"


<arg0 key="globalgameparamForm.postal2.displayname"/>


<field property="postal3"


<arg0 key="globalgameparamForm.postal3.displayname"/>




And finally the ApplicationResources where the messages are stored. As
mentioned, the required message is presented, but not the integer :

# Validator errormessages

errors.required={0} må fylles ut.

errors.integer={0} må være et heltall.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message