you can create your own version of string length validator and
override its validateOnNull to return true.

keep in mind that most validators in wicket and other libraries are
not equipped to handle null and will most likely blow up.
setrequired(true) is what is designed to handle nulls.

-igor

On Tue, Sep 11, 2012 at 2:55 PM, raphw <[email protected]> wrote:
> Is there a way to ungo the validator that checks for a required field when I
> e.g. reqistered a String-Length-Validator? I feel that the
> String-Length-Validator is more verbose than the Required-Validator that
> Wicket adds by itself and I'd like the String-Length-Validator to send its
> error message instead when a user did not enter anything. Setting
> setRequired(false) unfortunately deactivates any validaton and not only the
> Required-Validator. Thanks for help! Best, Rafael
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/setRequired-true-without-required-validator-tp4651929.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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]

Reply via email to