struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Holman <j.g.hol...@qmul.ac.uk>
Subject Can Struts trim whitespace from the user's data?
Date Thu, 25 Apr 2002 09:12:15 GMT
I want to strip leading and trailing spaces from the data entered by users 
in web forms. It would be convenient for Struts to have an option to do 
this, perhaps
while populating a FormBean from the HTTP request parameters, but I can't 
find anything.

Does anyone know whether there is support in Struts for this? If not, any 
suggestions about the best way? At present I'm considering doing an explicit
trim() for each field in the FormBean validate() method, but that is a lot 
of code that really should not be necessary, and I'm reluctant to do it.

Thanks, John.


--
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