[hibernate-issues] [Hibernate-JIRA] Created: (HV-22) Provide contextual validation

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed May 23 09:51:04 EDT 2007


Provide contextual validation
-----------------------------

                 Key: HV-22
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-22
             Project: Hibernate Validator
          Issue Type: New Feature
          Components: engine
            Reporter: Emmanuel Bernard


The basic idea is to have a special parameter in annotations named context(s)
@NotNull(message="doh", context = {"screen1Input", "screen2Input", "default"})

"default" being a special context, the one applied every time (including in the DDL)
no context or an empty context is equivalent to "default"

The regular API are running against "default"

Override the regular APIs with getInvalidValues(..., String context);

Not entirely sure the idea will float, but it sounds like a non invasive way to do it.

PS this might require to create @[Name]s annotations ie @NotNulls({@NotNull(message="m1", context="earlyStage"), @NotNull(message="m2")})

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