[ 
https://issues.apache.org/jira/browse/EXTVAL-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901228#action_12901228
 ] 

Gerhard Petracek commented on EXTVAL-114:
-----------------------------------------

it is planned to introduce @Expression as well as pluggable expression 
interpreters in r5.
we could use these mechanisms also for this feature. -> let's wait for r5.

you can use the implementation of the patch in a custom validation module (in 
this case you just have to ignore CommonMetaDataKeys or introduce e.g. 
CustomCommonMetaDataKeys).
current syntax:
@Valid(when = "value eq ...", validationErrorMsgKey = "invalid - expression: 
{0}")
or
@Valid(when = "#{value eq ...}", validationErrorMsgKey = "...")

syntax with @Expression:
@Valid(when = @Expression("value eq ..."), validationErrorMsgKey = "...")


> EL-expression as condition
> --------------------------
>
>                 Key: EXTVAL-114
>                 URL: https://issues.apache.org/jira/browse/EXTVAL-114
>             Project: MyFaces Extensions Validator
>          Issue Type: New Feature
>          Components: Property Validation
>            Reporter: Walter MourĂ£o
>            Priority: Minor
>         Attachments: EXTVAL-114_first_draft.patch
>
>
> It would be useful to define a condition as an EL expression. 
> Something like:
> @ValidWhen("property * 5 = 55")

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