add_filter(‘acf/validate_value/name=source_code’, ‘Validate_sourcecode’, 10, 4);
function Validate_sourcecode($valid, $value, $field, $input) {
// field key of the field you want to validate against
$sc = ‘field_5f62052ee929f’;
if ($value != $_POST[‘acf’][$sc]) {
$valid = ‘Code does not match’;
}
return $valid;
}
The validation does not work in registration system.