Your field names aren't the same. operator1 != operand1 operator2 != operand2
They must be the same or validation on those fields won't occur. robert > -----Original Message----- > From: Abhishek Srivastava [mailto:[EMAIL PROTECTED] > Sent: Friday, December 12, 2003 9:35 AM > To: [EMAIL PROTECTED] > Subject: Commons validation framework and struts > > > Hello All, > > I am trying to learn the new validation framework provided with struts 1.1 > and am facing a few problems. > > I have a form object which I have derived from ValidatorForm > class. In this > form I have fields like operator1, operator2. I have created a file called > validation.xml where I have made entries like > > <form-validation> > <formset> > <form name='calcForm'> > <field name='operand1' depends='required'> > </field> > <field name='operand2' depends='required'> > </field> > </form> > </formset> > </form-validation> > > The entry for action in my struts config is > > <action path='/calc' > type='com.abhi.CalcAction' > scope='request' > name='calcForm' > parameter='action' > input='/calc.jsp' > validate='true'> > <forward name='success2' path='/calc.jsp' /> > </action> > > <form-bean > name="calcForm" > type="com.abhi.CalcForm" > /> > > The application is working fine. Except that when I leave the fields > operator1 or operator2 empty then no error is reported. > > Is there some step which I have missed out? Please help me out. > > Regards, > Abhishek. > > --------------------------------------------------------------------- > 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]