Inline script - displays a field that allows you to input a new script from scratch. (Useful when you need to quickly add simple scripts you won't be using in other places.)
Validated transition is executed or cancelled based on logic contained in your Groovy Script.
In order to cancel a transition, validator needs to throw an exception. Otherwise, transition will be executed.
Even if Validator Script doesn't throw an exception, it's logic will still be executed. You can use this to perform various operations on transition stage.
Throwing an exception:
JIRA Transition Validators use InvalidInputException class to throw exception when transition needs to be cancelled. You need to import said class first in order for your script to work properly. This can be done by inserting the following line into your script: