You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Brad Cupit (JIRA)" <ji...@apache.org> on 2008/06/16 14:44:06 UTC

[jira] Commented: (WW-2563) Improve Validation - Add Support for Bean Validation API (JSR 303) / Hibernate Validator

    [ 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.