struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Tedone" <>
Subject Question about maxlength with Validator
Date Sun, 08 Jun 2003 10:03:00 GMT
Hi, now that I got Validator working properly, I'm trying to declare a
validation by which an edited field cannot be greater than a certain size,
but it doesn't work.

Here follows what I've done:

In the struts-config.xml file, i declared among the others, a  password
property in the DynaValidatorForm with the size attribute set to 10

<form-property name="password" type="java.lang.String" size="10" />

In the validation.xml file, I declared the validation for my field as

<field property="password" depends="required,maxlength">
<arg0 key="error.required.password"/>

I thought that maxlength would rely on the 'size' attribute declared in the
struts-config.xml file.

I obtain a message like the following when Validator performs the

* Password can not be greater than null characters.

What am I doing wrong?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message