class CurrencyValidator {

    public void validateCurrency(String currency, MessageError messageError) {
        if (StringUtils.isEmpty(currency)) {
            errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(FORMAT_ERROR_EMPTY_FIELD, CURRENCY_STRING));
        } else if (!isValidCurrency(currency)) {
            errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(FORMAT_ERROR_WRONG_FORMAT_VALUE, CURRENCY_STRING));
        }
    }

}