I’m writing a checkout process and I’m using beforeValidate and afterValidate to perform various functions. I noticed though that beforeValidate returns a boolean value that can be used to fail the validation, afterValidate however does not have this (at least not the base method). I’m wondering why this is?
You see I have some processes that I want performed after validation but if that process fails I want validation to fail. In this case it is payment processing, once I know the form data has validated I want to process the payment but if that fails I want validation to fail. Is there a better way to achieve what I need than using afterValidate?