You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eugen Berenstein <Eu...@laekh.de> on 2015/11/27 12:21:01 UTC
Form: Validation of JSR-303 Class Level Constraints
Hi,
I need to apply cross field constraints to an object with JSR-303. As I
understand class level constraints are the correct tool for this.
Is there a way in Wicket 7 or 8 to apply these on a Form's model object?
I have tried the 42lines:wicket-bean-validation library but the release
1.1 seems to be incompatible this Wicket 7. I also have overwritten
Form.onValidateModelObjects()
and added the validation there which does work but seems insufficient to
me.
Thank You, Eugen Berenstein
Antwort: Re: Form: Validation of JSR-303 Class Level Constraints
Posted by Eugen Berenstein <Eu...@laekh.de>.
Hi Martin,
Yes but the 42Lines library did contain ValidationForm which allowed
validation of class level constraints. This component is missing in the
merged library.
If it has been removed for some reason, is there another way to do class
level validation?
Eugen Berenstein
Hi,
42Lines Bean Validation has been merged to Wicket since 6.x
The code is at https://github.com/apache/wicket/tree/master/wicket-bean-
validation
Examples: http://examples7x.wicket.apache.org/bean-validation/
Documentation:
https://ci.apache.org/projects/wicket/guide/7.x/guide/forms2.html#forms2_4
> On Nov 27 2015, at 1:16 pm, Eugen Berenstein
<Eugen.Berenstein@laekh.de> wrote:
>
> Hi,
I need to apply cross field constraints to an object with JSR-303. As I
understand class level constraints are the correct tool for this.
Is there a way in Wicket 7 or 8 to apply these on a Form's model object?
>
> I have tried the 42lines:wicket-bean-validation library but the release
1.1 seems to be incompatible this Wicket 7. I also have overwritten
Form.onValidateModelObjects()
and added the validation there which does work but seems insufficient to
me.
>
> Thank You, Eugen Berenstein
Re: Form: Validation of JSR-303 Class Level Constraints
Posted by Martin Grigorov <ma...@gmail.com>.
Hi,
42Lines Bean Validation has been merged to Wicket since 6.x
The code is at https://github.com/apache/wicket/tree/master/wicket-bean-
validation
Examples: http://examples7x.wicket.apache.org/bean-validation/
Documentation:
https://ci.apache.org/projects/wicket/guide/7.x/guide/forms2.html#forms2_4
> On Nov 27 2015, at 1:16 pm, Eugen Berenstein
<Eugen.Berenstein@laekh.de> wrote:
>
> Hi,
I need to apply cross field constraints to an object with JSR-303. As I
understand class level constraints are the correct tool for this.
Is there a way in Wicket 7 or 8 to apply these on a Form's model object?
>
> I have tried the 42lines:wicket-bean-validation library but the release
1.1 seems to be incompatible this Wicket 7. I also have overwritten
Form.onValidateModelObjects()
and added the validation there which does work but seems insufficient to
me.
>
> Thank You, Eugen Berenstein