class FormValidatorImpl implements FormValidator {

    @Override
    public boolean validate(Form form, Object model) {

        form.getFields().forEach(FormField::clearError);

        boolean isModelValid = modelValidator.validate(form.getFields(),
                                                       model);
        boolean isFieldStateValid = fieldStateValidator.validate(form.getFields());

        return isFieldStateValid && isModelValid;
    }

    @Inject public  FormValidatorImpl(ModelValidator modelValidator,
                             FieldStateValidator fieldStateValidator);

}