private void addValidationMessage(final ConstraintValidatorContext context,
                                      final String configValue,
                                      final Path path,
                                      final String msg) {
        String msg2 = msg;
        if (!path.toString().equals(configValue)) {
            msg2 += " (as absolute path: " + path + ")";
        }
        context.disableDefaultConstraintViolation();
        context
                .buildConstraintViolationWithTemplate(msg2)
                .addConstraintViolation();
    }
Implements the validation logic.
The state of {@code value} must not be altered.
<p>
This method can be accessed concurrently, thread-safety must be ensured
by the implementation.

@param dir     object to validate
@param context context in which the constraint is evaluated
@return {@code false} if {@code value} does not pass the constraint
stroom-util/src/main/java/stroom/util/validation/ValidDirectoryPathValidatorImpl.java