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

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Aug 27 12:15:26 EDT 2008


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


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