Download sample application - GroovyValidation.zip. This sample implements pretty simple validation rule, to demonstrate how you can use mentioned Groovy keywords:
Reserved keyword oldValue is used to implement validation logic:
Developer can specify token method expressions in validation failure message based on the same oldValue and newValue:
On runtime, if validation rule will fail, it will show current wrong value. If you will not use newValue, it will show currently in database stored value, which is not correct.
4 comments:
I wrote a paper on introduction to groovy
http://www.oracle.com/technology/products/jdev/11/how-tos/groovy/introduction_to_groovy.pdf
I want validate email address using Groovy expression.
Hi friends!
The new link to Grant's paper is http://www.oracle.com/technetwork/developer-tools/jdev/introduction-to-groovy-128837.pdf
Hi Andrejus,
I'm getting an error using groovy expression on Error Message on JDeveloper12.2.1.2.0.
Compile Time Error: [Static type checking] - No such property: newValue for class:groovy.lang.Binding
Post a Comment