Class CrossIndustryInvoiceValidator
Validates a FacturXDotNet.Models.CII.CrossIndustryInvoice instance against the business rules defined in the Factur-X specification.
Assembly: FacturXDotNet.dll
csharp
public class CrossIndustryInvoiceValidator
Methods
Validate(CrossIndustryInvoice)
Determines whether the given invoice satisfies all applicable business rules.
csharp
public bool Validate(CrossIndustryInvoice cii)
Returns
System.Boolean
: true
if the invoice meets all required business rules; otherwise, false
.
Parameters
Type | Name | Description |
---|---|---|
FacturXDotNet.Models.CII.CrossIndustryInvoice | cii | The invoice to validate. |
ValidateRule(CrossIndustryInvoice, string)
Determines wheter the given invoice satisfies the specified business rule.
csharp
public bool ValidateRule(CrossIndustryInvoice cii, string businessRuleName)
Returns
System.Boolean
: true
if the invoice meets the specified business rule; otherwise, false
.
Parameters
Type | Name | Description |
---|---|---|
FacturXDotNet.Models.CII.CrossIndustryInvoice | cii | The invoice to validate. |
System.String | businessRuleName | The name of the business rule to validate, e.g. BR-1 . |
GetValidationResult(CrossIndustryInvoice)
Computes a detailed validation result for the given invoice.
csharp
public FacturXValidationResult GetValidationResult(CrossIndustryInvoice cii)
Returns
FacturXDotNet.Validation.FacturXValidationResult: A FacturXDotNet.Validation.FacturXValidationResult containing details of passed, failed, and skipped business rules.
Parameters
Type | Name | Description |
---|---|---|
FacturXDotNet.Models.CII.CrossIndustryInvoice | cii | The invoice to validate. |