Welcome to the Atlassian Community!
You do not validate anything in a post-function, it is too late in the change process to be checking something is valid.
You need to write a condition if you want to block people using a transition, or a validator if you want to check what they are doing during the transition.
You don't explain what "checking linked issue's summary" means, so we can't really offer much information.
You will also need to tell us what scripting or automation app you want to use for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.