Skip to content

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
TypeNameDescription
FacturXDotNet.Models.CII.CrossIndustryInvoiceciiThe 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
TypeNameDescription
FacturXDotNet.Models.CII.CrossIndustryInvoiceciiThe invoice to validate.
System.StringbusinessRuleNameThe 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
TypeNameDescription
FacturXDotNet.Models.CII.CrossIndustryInvoiceciiThe invoice to validate.

The tools are open source and released under the MIT License, feel free to use, modify, and share.