You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Riyaz Mansoor <rm...@gmail.com> on 2005/04/21 11:55:09 UTC

for input formatting

hi guys.


i would like to standardize some fields on a submitted form.

eg: FirstName field shud be first letter capital and the rest simple
regardless of
whatever Case the submitted text is. am NOT looking to validate
against a mask but rather format it transparently

what is the best way to do it?

1) is it possible to do this in Validator rules? Is the bean passed into 
validateXXX(bean, ... ) the actual object in the form or a copy? if it
is actual
object then i can just create a custom validateXXX() that just standardizes

2) its difficult to manipulate the <struts-config> <form> as it has
not built in
mechanism to standardize field values. can go for a <set-property>
thingy (write
RuleSet, custom ActionForm, custom factory ...) but it seems too much work

thanx
riyaz

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