Hi Francois, A miracle happened after adding <head> & <body> HTML elements to PageWithForm.html ;-) Without <head> Wicket logs an ERROR.
About Integer.MAX_VALUE - a breakpoint at org.apache.wicket.bean.validation.SizeTagModifier#modify shows that this method is called twice per property. Once with annotation.max() returning MAX_VALUE and second time with the set value(50). Maybe there is a bug at Hibernate-Validator or org.apache.wicket.bean.validation.ConstraintIterator#ConstraintIterator. Enjoy! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Sep 15, 2015 at 11:00 AM, Francois Meillet < francois.meil...@gmail.com> wrote: > Hi, > > I have a very strange problem !!! > > > A form is created using a model object containing validation annotation > constraints. > > The model object contains 3 properties (aaaaa, firstName, lastName) with > annotations like this > > @Size.List({ > @Size(min=2, message = "{xxx.sizeToSmall}"), > @Size(max=50, message = "{xxx.sizeToBig}") > }) > > xxx.sizeToSmall and xxx.sizeToBig key/value are present in the > WicketApplication.utf8.properties file > > When the form is rendered, the maxlength value may be wrong. > > > Actually the maxlength value is only wrong with the property 'firstName' > > with the following html > <input wicket:id="firstName" id="firstName" type="text" /> > <input wicket:id="firstName" id="firstName" type="text" maxlength="50" /> > > but with > <input wicket:id="firstName" id="firstName" type="text" MAXLENGTH="50" /> > the value will be ok > > This only happens with this 'firstName' property !!! > > > Environment: > ----------- > Wicket 7.0.0 > validation implementation : hibernate-validator > OSX & jdk 1.8 > > > here is the quickstart > > Thanks for yours suggestions > > François > > > > > > > > > >