Hi Ulrich,
Just guessing here, but how about setting t:validate="minlength=1" on
the field? This will pass if the field is empty, afaik. Of course, you
can set it to the real minimum length of the password and add a
maxlength as well.
That should do the trick.
-Filip
On 2008-09-02 16:17, Ulrich Stärk wrote:
Hi all,
I want to create and edit entities which have a required password field
using the beaneditor component. In order to have the password obscured
while being typed in (later it gets encrypted and stored in a database) I
overrode the corresponding field whith
<t:beaneditform t:id="form" t:object="account">
<t:parameter name="password">
<t:label for="password" />
<t:passwordfield t:id="password" value="account.password" />
</t:parameter>
</t:beaneditform>
My entity class has a @Validate("required") annotation applied to the
getter of the password field. This all works well when I create a new
instance of this entity type. But when I want to edit the entity, whithout
modifying the password fields, this fails because the output value of a
passwordfield is always blank per definition and thus validation fails. I
am forced to re-enter some password even if I don't want to change it. How
would you solve this?
Cheers,
Uli
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]