struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mart...@apache.org>
Subject Bug in Struts Validator
Date Sun, 12 Sep 2004 20:41:37 GMT
There appears to be a bug in the way that the error messages are put 
together in the validator code. The problem shows up in both the server 
side and client side messages, and I suspect appears only for messages 
that have more than one argument.

The easiest way to see the problem is in the registration tests in the 
validator module of the struts-examples app. If you just stick an "a" in 
every field and click Save, you'll see:

o 5 can not be less than null characters.
o Zip is invalid.
o Phone is invalid.
o E-mail is an invalid e-mail address.

The first of these is clearly wrong, and should have read "First Name can 
not be less than 5 characters". Somehow the field name seems to have been 
missed from the args.

I've taken a quick look at the code, and don't see where things are going 
wrong, so I'm hoping someone more familiar with that code could take a 
quick look also, and see if they can spot the problem.

--
Martin Cooper


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message