I am not sure if you are looking for the actual code or would like advice on a route to go/plugin to use. I would use the Script Validator in the Transition. The Script Validator can be found in the
It allows you to add your code and display a message if the validation fails i.e you return false. The code for this would be pretty straight forward Java