We can take advantage of young groovy language.
Let us validate salary in employee and if it is more than some range then we will throw the exception. All declaratively !!
Double click salary attribute in Entity Object
Provide the error message.
After running ADF BC tester and giving salary more than 25000 , I tabbed out and it throwed following exception.