package org.innovateuk.ifs.application.forms.sections.yourorganisation.form;

import org.innovateuk.ifs.finance.resource.OrganisationSize;

import javax.validation.constraints.NotNull;

/**
 * Form used to capture "Your organisation" information when a growth table is required.
 */
public class YourOrganisationWithoutGrowthTableForm {

    @NotNull(message = "{validation.yourorganisation.organisation.size.required}")
    private OrganisationSize organisationSize;

    @NotNull(message = "{validation.field.must.not.be.blank}")
    private Long turnover;

    @NotNull(message = "{validation.field.must.not.be.blank}")
    private Long headCount;

    private Boolean stateAidAgreed;

    YourOrganisationWithoutGrowthTableForm(
            OrganisationSize organisationSize,
            Long turnover,
            Long headCount,
            Boolean stateAidAgreed) {

        this.organisationSize = organisationSize;
        this.turnover = turnover;
        this.headCount = headCount;
        this.stateAidAgreed = stateAidAgreed;
    }

    YourOrganisationWithoutGrowthTableForm() {
    }

    public OrganisationSize getOrganisationSize() {
        return organisationSize;
    }

    public void setOrganisationSize(OrganisationSize organisationSize) {
        this.organisationSize = organisationSize;
    }

    public Long getTurnover() {
        return turnover;
    }

    public void setTurnover(Long turnover) {
        this.turnover = turnover;
    }

    public Long getHeadCount() {
        return headCount;
    }

    public void setHeadCount(Long headCount) {
        this.headCount = headCount;
    }

    public Boolean getStateAidAgreed() {
        return stateAidAgreed;
    }

    public void setStateAidAgreed(Boolean stateAidAgreed) {
        this.stateAidAgreed = stateAidAgreed;
    }
}
@@ -133,16 +133,57 @@
 nSize;%0A%0A
+import javax.validation.constraints.Max;%0A
 import j
@@ -574,91 +574,269 @@
     
-private Long turnover;%0A%0A    @NotNull(message = %22%7Bvalidation.field.must.not.be.blank
+@Max(value = 2147483647, message = %22%7Bvalidation.standard.integer.max.value.format%7D%22)%0A    private Long turnover;%0A%0A    @NotNull(message = %22%7Bvalidation.field.must.not.be.blank%7D%22)%0A    @Max(value = 2147483647, message = %22%7Bvalidation.standard.integer.max.value.format
 %7D%22)%0A

Update validation on organisation page