Nope, but you can use expressions: http://struts.apache.org/development/2.x/docs/validation.html#Validation-LocalizingandParameterizingMessages
Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/7/11 Alireza Fattahi <afatt...@yahoo.com>: > Hi, > > Well I mean is there a way which I can tell the validation frame work that > all "required string" validations should display this message > <message> The ${TheFiledWhichFailed} must be a string </meesage> > And then I define: > <validator type="requiredstring"> > <param name="fieldName">Username</param> > </validator> > <validator type="required"> > <param name="fieldName">Address</param> > </validator> > > So when the validation fails it generates: > The username must be string. > The address must be string. > ..... > > > Or should I do it: > <validator type="requiredstring"> > <param name="fieldName">Username</param> > <message>Username must be string.</message> > </validator> > > <validator type="required"> > <param name="fieldName">Address</param> > <message>Address must be string.</message> > </validator> > > > > ~Regards, > ~~Alireza Fattahi > > > ________________________________ > From: Lukasz Lenart <lukaszlen...@apache.org> > To: Struts Users Mailing List <user@struts.apache.org> > Sent: Wednesday, 10 July 2013, 16:47 > Subject: Re: Global Validation > > > 2013/7/10 Alireza Fattahi <afatt...@yahoo.com>: >> Hi, >> >> Are there Global Validation in struts 2 ?! > > What you mean by that? Validations which affects each and every > action? If so, no. > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org