class FieldStateValidatorImpl implements FieldStateValidator {

    protected boolean validateFieldValueRequired(FormField field,
                                                 Object value) {
        String message = translationService.getTranslation(ProcessingEngineConstants.FieldStateValidatorImplFieldIsRequired);
        if (value == null) {
            field.showError(message);
            return false;
        }
        if (validators.containsKey(value.getClass())) {
            Predicate predicate = validators.get(value.getClass());
            if (!predicate.test(value)) {
                field.showError(message);
                return false;
            }
        }
        return true;
    }

    @Inject public  FieldStateValidatorImpl(TranslationService translationService);

}