[ 
https://issues.apache.org/jira/browse/EXTVAL-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek resolved EXTVAL-73.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.3-SNAPSHOT
                   2.0.3-SNAPSHOT
                   1.2.3-SNAPSHOT

> pluggable severities
> --------------------
>
>                 Key: EXTVAL-73
>                 URL: https://issues.apache.org/jira/browse/EXTVAL-73
>             Project: MyFaces Extensions Validator
>          Issue Type: New Feature
>          Components: Bean Validation, Core, Property Validation
>    Affects Versions: 1.2.3-SNAPSHOT, 2.0.3-SNAPSHOT, 1.1.3-SNAPSHOT
>            Reporter: Gerhard Petracek
>             Fix For: 1.2.3-SNAPSHOT, 2.0.3-SNAPSHOT, 1.1.3-SNAPSHOT
>
>
> it should be possible to register custom validation parameter / payload as 
> replacement for the default severity parameters to allow independent 
> constraints without dependency to the framework.
> examples
> register custom payload (for jsr303):
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Warn.class.getName(),
>  CustomBvViolationSeverity.Warning.class);
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Fatal.class.getName(),
>  CustomBvViolationSeverity.Fatal.class);
> ...
> usage:
> @NotNull(payload = CustomBvViolationSeverity.Warning.class)
> register custom validation parameter (for extval annotations):
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.class.getName(),
>  CustomExtValViolationSeverity.class);
> usage:
> @CustomRequired(parameters = CustomExtValViolationSeverity.Warning.class)
> the custom implementations behave like the default implementations 
> (automatically) with the advantage that there is no dependency to extval

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to