Validate each field using integer and intRange attribute values for validation.
e.g. <field property="ssnFirstField" depends="integer,intRange"> <arg position="0" key="ssnFirstField"/> <arg position="1" name="intRange" key="${var:min}" resource="false"/> <arg position="2" name="intRange" key="${var:max}" resource="false"/> <var><var-name>min</var-name><var-value>000</var-value></var> <var><var-name>max</var-name><var-value>999</var-value></var> </field> And so on. As for making sure on the client side that the user does not enter more than 3 digits, use the "maxLength" attribute of the HTML text field. Link: http://www.w3schools.com/htmldom/dom_obj_text.asp Further, you can also write a JavaScript function to make sure that only numeric values are allowed in the field. Harsh. -----Original Message----- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 23, 2006 2:28 PM To: user@struts.apache.org Subject: validation creating a jsp in which the user will be entering their SSN. Have 3 inputfields using which the user will be able to enter the SSN. Have to make sure the user entered only 3 digits in first inputfield, only 2 digits in the second input field and 4 digits in the third inputfield. using validation.xml for validation. Also, is there anyway in jsp for not allowing the user to enter more digits in each of the inputfields. Thanks. _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ --------------------------------------------------------------------- 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]