Shameless plug – you can use my Validated Field plugin to check ACF field submissions. I am currently working on an upgrade (done with 5.x, working through the 4.x code now) but you can check it out in the WordPress repo here: https://wordpress.org/plugins/validated-field-for-acf/
The logic above would still be used as part of the PHP validation, and if there is an error you would just return "this is the error message";
otherwise you can return true;
to have it pass (or just do nothing, pass is the default).