Hi, escaping does not matter. Output for error.maxlength=\'{0}\' can not be greater than {1} characters. is the same as for error.maxlength='{0}' can not be greater than {1} characters. (and the same as for error.maxlength={0} can not be greater than {1} characters.) The '' always disappear. I was looking for a solution because that worked in Struts1, and while migrating from Struts1 I wanted to keep the error messages the way my users are used to.
The links to the examples/mailreader2 do not use <message> with <param="0" "1" etc.> but thx. They work different, and maybe a help to redesign my error messages. Best regards Ute > Gesendet: Dienstag, 6. Mai 2025 um 10:55 > Von: "Lukasz Lenart" <lukaszlen...@apache.org> > An: "Struts Users Mailing List" <user@struts.apache.org> > Betreff: Re: Validation problem > > > Not sure if I understood your issue, did you try to use escape char? > > error.maxlength=\'{0}\' can not be greater than {1} characters. > > > The example from the struts page is for requiredstring. > > Is there an example for stringlength with maxlenght-output? > > Take a look here > https://github.com/apache/struts-examples/blob/main/mailreader2/src/main/resources/org/apache/struts/examples/mailreader2/Registration-Registration_save-validation.xml#L9-L14 > > and error message definition > https://github.com/apache/struts-examples/blob/main/mailreader2/src/main/resources/org/apache/struts/examples/mailreader2/MailreaderSupport.properties#L94 > > there are also other examples, yet I'm not sure if they are up-to-date > > > And where can I find all possible field-validator types? > > Here is the list > https://struts.apache.org/core-developers/validation#bundled-validators > > > Cheers > Łukasz > > --------------------------------------------------------------------- > 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