class YourFundingFormValidator extends AbstractYourFundingFormValidator {

    public void validate(AbstractYourFundingForm form, Errors errors, UserResource user, long applicationId) {

        ApplicationResource applicationResource = applicationRestService.getApplicationById(applicationId).getSuccess();
        CompetitionApplicationConfigResource competitionApplicationConfigResource
                = competitionApplicationConfigRestService.findOneByCompetitionId(applicationResource.getCompetition()).getSuccess();

        Supplier<BaseFinanceResource> financeSupplier = () -> {
            OrganisationResource organisation = organisationRestService.getByUserAndApplicationId(user.getId(), applicationId).getSuccess();
            return applicationFinanceRestService.getFinanceDetails(applicationId, organisation.getId()).getSuccess();
        };
        validate(form, errors, financeSupplier, competitionApplicationConfigResource.getMaximumFundingSought());

        if (form instanceof YourFundingAmountForm ) {
            validateLessThanCosts((YourFundingAmountForm) form, errors, financeSupplier);
        }
    }

}