[hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-4) Return value for @NotEmpty for null values

Emmanuel Bernard (JIRA) noreply at atlassian.com
Mon Nov 3 17:34:06 EST 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved BVAL-4.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0 public draft

> Return value for @NotEmpty for null values
> ------------------------------------------
>
>                 Key: BVAL-4
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-4
>             Project: Bean Validation
>          Issue Type: Task
>          Components: spec-general
>            Reporter: Hardy Ferentschik
>             Fix For: 1.0 public draft
>
>
> The spec says:
> "While not mandatory, it is considered a good parctice to split the core constraint from the not null constraint validation ..."
> As examples we have @Email and @Length, but would the same not apply for @NotEmpty. From a programmers point of view I think @NotEmpty should return true for null values. However, one could argue that from a GUI perspective it would not make sense to get to different validation messages. In fact, a user does not know what it means that the value cannot be null. However, any decent GUI/web framework will make sure that a string value will always be passed as empty string when nothing is entered by the user. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list