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

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Aug 24 02:05:57 EDT 2007


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

Emmanuel Bernard updated HV-22:
-------------------------------

    Attachment: diff.txt

Here is a basic implementation if anyone is interested

> 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
>         Attachments: diff.txt
>
>
> 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