Hi Markus, Take a look at the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL config parameter in web.xml.
Setting this to true will cause that your property "input" will be null, if the user submits an empty field and thus @Length will not be processed. Also take a look at http://jsfatwork.irian.at/semistatic/jsf.html, chapter 2.12 Validierung fur further information. It's written in german, but I assume you're from Germany... Regards Jakob Korherr 2009/11/30 Dreher, Markus <[email protected]> > Hi all, > > i want to validate a field only when the user filled it out. > > It's not a reuqired field, but when it is filled out, the input should > be at least for example 3 digits. > > @Length(minimum=3, maximum = 60) > private String input; > > With @Length this leads to a required field. > > Do i miss something? > > Regards, > > Markus > > >

