Skip to content

Commit

Permalink
Fixing pl party validation
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Dec 7, 2023
1 parent 8990fe5 commit e319db8
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions regimes/pl/invoices.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ func (v *invoiceValidator) supplier(value interface{}) error {
tax.RequireIdentityCode,
validation.By(validatePolishTaxIdentity),
),
validation.Field(&obj.Name,
validation.When(
len(obj.People) == 0,
validation.Required,
),
),
validation.Field(&obj.People[0].Name,
validation.When(
obj.Name == "",
validation.Required,
),
),
)
}

Expand All @@ -90,18 +78,6 @@ func (v *invoiceValidator) commercialCustomer(value interface{}) error {
validation.By(validatePolishTaxIdentity),
), // TODO check if id is valid when other entity
),
validation.Field(&obj.Name,
validation.When(
len(obj.People) == 0,
validation.Required,
),
),
validation.Field(&obj.People[0].Name,
validation.When(
obj.Name == "",
validation.Required,
),
),
)
}

Expand Down

0 comments on commit e319db8

Please sign in to comment.