Hi,

I have three questions regarding client side validation.

When using a table in a form and the validation messages duplicates each time 
the form is submitted. How is this resolved?

I am using a custom theme so I can put more than two columns in a table. When 
using this theme I get the error TypeError: row.cells is undefined in firefox.
This question probably relates to my first question one though.

If I want to validate a integer input, between zero and 10 then no error 
message is displayed if the no value is entered in the text field. Also a zero 
is displayed in the field if the user has not entered any value.
How can it be done that the validation checks so that the field is not empty 
and if the user enters a value outside the range 0-100 a error message is 
displayed?


<s:form method ="post" action="test"  validate="true">
<table>
      <s:textfield name="bean.test1" key="name" size="20" />
      <s:textfield name="bean.test2" key="age" size="20" />
      <s:submit value="ok" />
</table>
</s:form>

<validator type="int" >
<param name="fieldName">dealBean.test1</param>
      <param name="min">1</param>
      <param name="max">100</param>
      <message>...</message>
</validator>


<validator type="int" >
<param name="fieldName">dealBean.test2</param>
      <param name="min">1</param>
      <param name="max">100</param>
      <message>...</message>
</validator>


I am new at struts and web development in general and from searching for 
information online I do not get this to work...
Would be very happy if someone could help me with these issues.


Thank you,

Christoffer Kappers



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

Reply via email to