You can debug your app,and step in the required validator class'validation method. And check whether the value is populated . Maybe it'snull .
2010/10/5, Darren Karstens <darrenkarst...@gmail.com>: > Hi, > I have a xml validator for my user login action which requires values > for both the userName and password fields. However when submit the > form with these fields populated I still get the same "Username is > required" and "Password is required" messages. Am I right in thinking > that the "required" validator is triggered if no value is supplied for > the field? If thats the case why would it be triggered when I supply > values for those fields? > > Here is the validation xml file: > > <!DOCTYPE validators PUBLIC > "-//OpenSymphony Group//XWork Validator 1.0.2//EN" > "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> > <validators> > <field name="userName"> > <field-validator type="required"> > <message>Username is required.</message> > </field-validator> > </field> > <field name="password"> > <field-validator type="required"> > <message>Password is required.</message> > </field-validator> > </field> > </validators> > > Regards, > Darren > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- 从我的移动设备发送 *Kun He* (or Raymond He) A Java Programmer Alibaba inc. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org