I have a validation function that I want to throw error when the validation fails. This is the code I use:
define validate if [ condition... ]; then \\