/** * Returns message for the {@link PropertyValidation}. * * @return Returns message for the {@link PropertyValidation}. */ public String getMessage() { StringBuilder stringBuilder = new StringBuilder(); if (this.hasErrors()) { stringBuilder.append("Property "); stringBuilder.append(this.getProperty().getName()); stringBuilder.append(" can not be validated. Validation test failed because of the following errors:\n"); for (ValidationError validationError : this.getErrors()) { stringBuilder.append("||- "); stringBuilder.append(validationError.getMessage()); } } else { stringBuilder.append("Property "); stringBuilder.append(this.getProperty().getName()); stringBuilder.append("validated without errors."); } return stringBuilder.toString(); }