[
https://issues.apache.org/struts/browse/WW-2563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44170#action_44170
]
Brad Cupit commented on WW-2563:
--------------------------------
The problem with using the Hibernate Validator is that it expects the
validation annotations to be on either a getter or a field.
The xwork validator allows annotations on either the getters or the setters.
Putting validation annotations on setters seems very natural to me, and the
preferred way to go for Struts 2 Actions.
The ideal situation (in my opinion) would be for setters to have the validation
annotations, and for getters to be optional. I'm not sure if JSR 303 will
address this.
> Improve Validation - Add Support for Bean Validation API (JSR 303) /
> Hibernate Validator
> ----------------------------------------------------------------------------------------
>
> Key: WW-2563
> URL: https://issues.apache.org/struts/browse/WW-2563
> Project: Struts 2
> Issue Type: New Feature
> Reporter: Gunnar Hillert
> Fix For: 2.2.x
>
>
> Today the initial draft of the Bean Validation framework has been released.
> It would be nice if Struts' Validator would support JSR 303 and/or Hibernate
> validator.
> See also:
> - http://jcp.org/en/jsr/detail?id=303
> - http://validator.hibernate.org
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.