struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel Stahlhut" <astahl...@neusta.de>
Subject [Validator] - Strange behaviour and not validating
Date Thu, 21 Nov 2002 19:48:33 GMT
Hi.

I encounter a strange behaviour of the Struts-Validator (Struts 1.1b2):
In validator.xml I set up the following rules:

<field property="glEmpId"
depends="required,long">
<arg0 key="ab"/>
<arg1 key="error.required"/>
</field>
<field property="name"
depends="required">
<arg0 key="global.name"/>
<arg1 key="error.required"/>
</field>

Inside the form I've got the following:
<html:select property="glEmpId">
<html:option value="x"><bean:message
key="global.yourSelection"/></html:option>
</html:select>

The Validator validates the field name correct. The field glEmpId is not
validated at all! It doesnt matter if I send the "x" or an empty String, in
both cases one of the Validators (required or long) should generate an
ActionError, shouldn't it? What am I doing wrong here?

By the way, does anybody know, why the validator example in the newest
Struts nightly builds (which iI don't use) is broken? Will it be fixed?

Thanks
Axel



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message