Instead of throwing an exception, you should use the Callback constraint, to execute the logic inside the utility method just as a validator.
In the documentation referenced above, you can see how you can add error messages to the validation errors from within this utility method.