Log in
Interface

InvoiceValidatorInterface

Magento\Sales\Model\Order\Invoice\InvoiceValidatorInterface

What it does

This interface defines the contract for validating invoices in Magento 2.

Developers implement this interface to create validators that check if an invoice meets business rules and requirements before it's saved or processed.

The validate method accepts an invoice entity and an array of validator objects, returning validation results or throwing an exception if validation fails.

Public Methods

  • validate()