diff --git a/lambda/create/validate.go b/lambda/create/validate.go index a10e7d72..24f9ff7c 100644 --- a/lambda/create/validate.go +++ b/lambda/create/validate.go @@ -127,8 +127,8 @@ func validateTrustCorporation(prefix string, trustCorporation shared.TrustCorpor validate.Address(fmt.Sprintf("%s/address", prefix), trustCorporation.Address), validate.IsValid(fmt.Sprintf("%s/channel", prefix), trustCorporation.Channel), validate.IsValid(fmt.Sprintf("%s/status", prefix), trustCorporation.Status), - validate.IfElse(trustCorporation.Channel == shared.ChannelOnline, - validate.Required(fmt.Sprintf("%s/email", prefix), trustCorporation.Email), - validate.Empty(fmt.Sprintf("%s/email", prefix), trustCorporation.Email)), + //validate.IfElse(trustCorporation.Channel == shared.ChannelOnline, + // validate.Required(fmt.Sprintf("%s/email", prefix), trustCorporation.Email), + // validate.Empty(fmt.Sprintf("%s/email", prefix), trustCorporation.Email)), ) } diff --git a/lambda/create/validate_test.go b/lambda/create/validate_test.go index dbf298fc..9416ed02 100644 --- a/lambda/create/validate_test.go +++ b/lambda/create/validate_test.go @@ -299,31 +299,31 @@ func TestValidateLpaInvalid(t *testing.T) { {Source: "/lifeSustainingTreatmentOption", Detail: "field must not be provided"}, }, }, - "online trust corporation missing email": { - lpa: shared.LpaInit{ - TrustCorporations: []shared.TrustCorporation{ - { - Channel: shared.ChannelOnline, - }, - }, - }, - contains: []shared.FieldError{ - {Source: "/trustCorporations/0/email", Detail: "field is required"}, - }, - }, - "paper trust corporation with email": { - lpa: shared.LpaInit{ - TrustCorporations: []shared.TrustCorporation{ - { - Channel: shared.ChannelPaper, - Email: "a@example.com", - }, - }, - }, - contains: []shared.FieldError{ - {Source: "/trustCorporations/0/email", Detail: "field must not be provided"}, - }, - }, + //"online trust corporation missing email": { + // lpa: shared.LpaInit{ + // TrustCorporations: []shared.TrustCorporation{ + // { + // Channel: shared.ChannelOnline, + // }, + // }, + // }, + // contains: []shared.FieldError{ + // {Source: "/trustCorporations/0/email", Detail: "field is required"}, + // }, + //}, + //"paper trust corporation with email": { + // lpa: shared.LpaInit{ + // TrustCorporations: []shared.TrustCorporation{ + // { + // Channel: shared.ChannelPaper, + // Email: "a@example.com", + // }, + // }, + // }, + // contains: []shared.FieldError{ + // {Source: "/trustCorporations/0/email", Detail: "field must not be provided"}, + // }, + //}, } for name, tc := range testcases {