If I understand your situation and code correctly, then you are only interested in validating on certian variables in your component state.
You could achieve the desired validation behaviour by adding the following method to your component:
getCustomValidation() {
// Extract a list for validation on only the state fields that are
// relevance to the form validation
const fieldsToValidate = [
"ppvLimit",
"securityCode",
"primaryPhone",
"secondaryPhone",
"email",
"billingAddressLine1",
"billingAddressLine2",
"billingAddressCity",
"billingAddressTerritoryCode",
"billingAddressPostalCode",
"contactAddressLine1",
"contactAddressLine2",
"contactAddressCity",
"contactAddressTerritoryCode",
"contactAddressPostalCode",
"authorizedUser1",
"authorizedUser2",
"authorizedUser3",
"authorizedUser4"
];
// Iterate each field to check to determine if field is valid
for(const fieldToValidate of fieldsToValidate) {
// Extract value for current field
const value = this.state[ fieldToValidate ]
// If value is "truthy" then return valid (true)
if( !!value ) {
return true
}
}
// If none of the validation fields are valid, return false
return false;
}
To make use of this, you could update the Submit component in your render method as follows:
<Button primary disabled={ !this.getCustomValidation() } type="submit">
{ loading ? <div><LoadingIcon size="lg" /> Saving...</div> : "Update" }
</Button>